asgr
Junior Member

Posts: 56
|
Post by asgr on Jul 26, 2017 12:55:01 GMT 8
Hi All,
I thought I might start a thread explicitly about feature suggestions for ProFound. Please reply with any ideas!
Cheers,
A
|
|
|
Post by Caroline Foster on Aug 24, 2017 12:39:52 GMT 8
Hi Aaron, Many thanks for writing this package and extending it to fit ellipse profiles. It works amazingly well on the majority of galaxies so long as the data are good enough quality. I have now fitted all galaxies in my large scale kinematics sample with HSC, KiDS or panstarrs data. For the most part, it works very well. I do have a couple of comments or wishes that I think would improve the outcome and make it a bit more similar to the ellipse program in iras. 1- The first is that when there is a big spiral galaxy, the fit is awful because it doesn’t really know what to do with spiral arms. I think there could be an option to smooth the images first in a similar way as for the segmentation map step. That way the ellipticities could be somewhat meaningful even for grand design spirals. I notice those are often better fitted in lower resolution images! 2- I think it would be nice if there was a function that could take the output from the ellipses routine and convert it into a fake image. This will allow one to subtract it from the original to look at residuals and make a quality judgement without having to subjectively eyeball everything (especially useful if one has thousands of galaxies and multiple imaging datasets. Is there already something like this or some way to compute residuals from the output somehow? 3- I think it should be a requirement that the various parameters vary smoothly (no jumping). At the moment (mostly the case for box fits), there is the occasional weird (few) square(s) in the middle of the fit… 4- At the moment, one specifies how many ellipse “levels” one wants. I don’t know whether this makes sense for automating. There should be an option for the program to decide the best number of ellipses such that they are separated by a reasonable number of pixels and stop when the signal to noise is below some threshold. 5- It often seems to have the wrong centre… not sure what’s going on there? In some of these cases the crappier dataset was better with a better centre determination! In general, I note that if the box fit works, it’s usually (but not always) a much better fit (although I have not looked at this quantitatively without being able to compute residuals). Keep me posted if you have any improvements coming up  . Cheers, Caro...
|
|
Robin
New Member
I couple the distributions and kinematics of cold gas in galaxies w/ Bulge/Disk decompositions.
Posts: 13
|
Post by Robin on Aug 24, 2017 18:26:50 GMT 8
Hi Caroline, I have done some 1D ellipse fitting as well with hit and miss success. I mostly use it as an attempt to get reasonable solutions to fit into more complicated 2D fitting algorithms. 1) True, the higher the resolution of your data, the more room there is for variation from pixel-to-pixel. If you want to do some smoothing on your images to attempt to blur out the spiral structure, you can use profitImBlur(image,sigma) (check out the documentation for useful extras like profitImGrad() and profitImDiff() ). I've created a thread here: profit.freeforums.net/post/74/thread as an example. Apologies, I will have to get back to you on the rest later this evening. Stay tuned  Regards, Robin.
|
|
Robin
New Member
I couple the distributions and kinematics of cold gas in galaxies w/ Bulge/Disk decompositions.
Posts: 13
|
Post by Robin on Aug 24, 2017 21:13:39 GMT 8
Hi again Caroline, 2) I think what you are looking for here is profitRemakeModellist( ) which you should be able to input the outputs from your optimisation run into, you also need to provide a modellist which describes the basic structure of your model (e.g. 1 Sersic, 2 Sersic + 1 Ferrer, 8 Bananas + 3 spoons, etc.) and finally you need to give a tofit vector which in this case is telling the function which elements of the modellist do you want to replace by the optimisation values, for example: optimModel=profitRemakeModellist(LAFit$Summary1[,1],Data$modellist,Data$tofit)$modellist # Gives me a standard ProFit modellist structure (Data is just a structure containing all the vectors for the fitting, i.e. modellist, intervals, tofit, etc. You may use whatever is appropriate for you) Then you will need to feed this new model into profitMakeModel(), something like this: optimImage = profitMakeModel(optimModel,dim=dim(image),magzero=ZERO_POINT)$z Now you can go ahead and plot this matrix as you would any other image. ** Remember that if you don't add any Gaussian noise to the image, you might be surprised at how extended it looks compared to the real image (of course, if you're just doing a data-model subtraction that wouldn't matter) ** 3) Apologies, I can't I understand what you mean by this point. Perhaps you could provide an image to describe it? 4) It almost sounds like you are needing to run an optimisation run to find the optimal spacing between ellipses... to then feed into your optimisation. It's hard to say because the signal to noise value will vary across the light profile of the galaxy so if you required a minimum SNR in each annulus, then they would need to all also be different sizes. One possibility might be to run a quick profoundProfound() call on the image to get the approximate size of your galaxy and decide the levels from there. 5) If you are referring to "wrong centre" as in the fit is converging towards say a noise peak or a clump in a spiral arm then there might be a few things you can do to try to minimize this happening. Firstly try to impose some tighter intervals on the x/y range that the position may explore. If you know the galaxy is at the centre of your image (which, as an aside, it really has to be to get a good fit) then you can impose an interval range of the centre position plus or minus some appropriate range. Otherwise, you could think about using "priors" which essentially inform your optimisation function of the typical variance in these parameters. Not all optimisation routines allow for this kind of thing. And yes, typically poorer quality data is inherently smoother than finer resolution data so it would be less likely to fall onto an incorrect centre. Never forget that ProFit has no knowledge of the nature of galaxies so if it thinks fitting to a nearby clump is the most likely scenario, it will go ahead and give you that as an answer. I hope that helps  Cheers, Robin.
|
|
asgr
Junior Member

Posts: 56
|
Post by asgr on Aug 25, 2017 9:37:34 GMT 8
Ah, I think Robin you might have misunderstood some of what Caroline is asking about. She is only using the ellipse fitting routine (via profoundGetEllipses), not fitting a 2D model. My answers:
1) The basic issue is real spiral galaxies cannot be fit with ellipses. Smoothing might be a workaround to this: have a look at profoundImBlur
2) Hmm, basically not easily. ProFit is mostly focussed on 2D fitting (which obviously does do this). Extracting 1D ellipses and then subtracting them is possibly doable, but it wouldn't be trivial.
3) Because of what the routine is trying to do, jumps are allowed. Basically it isn't fitting the ellipses but measuring the shapes of the isophotes, so if these jump then so to can the ellipses. There is nothing inherently in the code that knows about adjacent solutions, but in practice because galaxies tend to vary smoothly, so do the ellipses. You could fit a spline to the result and remove outliers- maybe that would be a reasonable solution?
4) This is probably quite easy to implement, but I'd need a reasonable rule-of-tumb to go by. Nseg/100 or Nseg/1000?
5) Perhaps use the fixcen option? I could add an option to specify the centre, but currently it uses the flux weighted x and y positions.
User experimentation is always encouraged- feel free to directly edit the function/s, and if you think you have improved something then I can pull it back into the main branch.
A
|
|