Author Topic: New Tool: DynamicPSF  (Read 39544 times)

Offline Redshift

  • PixInsight Enthusiast
  • **
  • Posts: 83
Re: New Tool: DynamicPSF
« Reply #15 on: 2011 July 18 10:25:51 »
Hi Dave,

there are indeed two updates. Are you now able to use the new process? If not, could you clarify where it's grey'd out? I didn't know a process could be disabled in the process explorer.

Hi Sander,

After the second update it appears to be working, thank you. All I have to do now is understand it  :)

Dave

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: New Tool: DynamicPSF
« Reply #16 on: 2011 July 18 10:46:01 »
Hi

Nobody had a go with the range selection tool , very simple but I think will be very handy  8)

Harry
Harry Page

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #17 on: 2011 July 18 11:21:35 »
I have no idea what RangeSelection does. There is no help and searching the forums shows no hits. Could you summarize please?
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: New Tool: DynamicPSF
« Reply #18 on: 2011 July 18 11:26:55 »
Hi

It only came yesterday with the update  8)

Basically you select the brightness to create a mask , Ie great for selecting stars  there is a real time preview to see what you are doing  ;D

Of course it can be for more than stars if you set the sliders correctly , and use fuzziness to fade the selection

If you look under updates / view installed updates there is a bit of info

harry
Harry Page

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #19 on: 2011 July 18 11:32:28 »
Oh, that's handy. I forgot to check under the update log, thanks for the reminder.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Re: New Tool: DynamicPSF
« Reply #20 on: 2011 July 18 14:29:51 »
This Dynamic PSF tool has been a bit of a long time coming, but as with many things in PI when it arrived it is spectacular!
« Last Edit: 2011 July 18 15:11:33 by Jack Harvey »
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Tool: DynamicPSF
« Reply #21 on: 2011 July 18 15:58:04 »
Thanks guys for your nice words.

The two arrow buttons are to regenerate (recalculate) PSFs. The single arrow button will regenerate the currently selected stars (you can select stars either on the list or by clicking them on the image). The double arrow button regenerates all stars. PSFs are recalculated for the current "PSF Model Functions".

Some tips:

- PSFs can only be (meaningfully) measured on linear images.

- Use the STF tool with automatic screen stretch to work with DynamicPSF.

- Normally, our goal is to determine the "average PSF" of an image. This task involves some "art" and requires some experience to be done properly. Not all stars are valid for this task:

* Saturated stars are useless. Avoid stars for which the amplitude parameter (A) is close to or larger than one. Ideally, A should not be larger than 0.3 or 0.5.

* Too dim stars cannot be fitted properly. This happens mainly because for too dim stars the wings of the fitting function (Gaussian or Moffat) are undistinguishable from the local background.

- If the rotation angle (theta) and/or the aspect ratio (r) don't stabilize for a set of 5 - 10 good star fittings, then you should fit circular functions. This happens with undersampled images and also under high noise levels.

- Click the Sort button (down arrow) to sort the set of fitted stars by mean absolute deviation (MAD). If the stars at the bottom have comparatively poor fitting quality (for example, you get 1.0e-04 at the top of the list and 1.0e-02 at the bottom), remove the worst fittings and, if necessary, choose different stars for which the fitting quality improves.

- Watch out for round and little objects of stellar appearance that may not be stars. This happens very frequently on deep images with small background galaxies. Normally these objects can be detected because they tend to be fitted with much larger functions (watch the sx and sy parameters) as they usually have much larger dispersion than true stars.

- Once you have a sufficiently large set of reasonable PSF fittings (say from 10 to 50, depending on the image), click the Export button (little blue sphere) to generate an average PSF as a new image window. The generated PSF is normalized, that is, it uses the whole [0,1] range and is suitable to be used with the Deconvolution tool (in External PSF mode).

- If you want to compare FWHM estimates between images, you probably need to use the same fitting function in all cases: either Gaussian or a fixed beta Moffat. Bear in mind that each function will provide a different FWHM even for the same star. Or you can compare average PSFs obtained as above; you can fit a PSF for an average PSF :)

Hope this helps.
« Last Edit: 2011 July 18 16:08:44 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Tool: DynamicPSF
« Reply #22 on: 2011 July 18 16:19:52 »
An additional word of caution. If you want to compare FWHM or other fitted parameters for images generated with different applications, please compute all the PSF models with one of the applications. When it comes to compare image quality, don't use PSF models computed by different applications, as such comparisons are mostly meaningless due to radically different function fitting algorithms and implementations. For the sake of accuracy and robustness, I strongly recommend you use the new DynamicPSF tool in PixInsight.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
Re: New Tool: DynamicPSF
« Reply #23 on: 2011 July 18 17:07:18 »
Thanks for the tips, Juan. They are really very helpful.

With regards to using the information with the Decon tool, would you choose the exported synthetic PSF image in the View Identifier window on the External PSF tab of the Decon tool?

Also, would you please expand on your explanation of MAD? I'm not a mathematician and way too many years removed from my meager math education so could you briefly explain the MAD number and what number constitutes a good fit versus a poor fit.

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: New Tool: DynamicPSF
« Reply #24 on: 2011 July 19 05:20:11 »
Hi

I tested this new function, mainly for PSF extraction

1 example :
First, linear image, manually select 63 stars




average FWHM is X=1.92 pix en x  Y=1.80 pix

Generate PSF

Deconvolution with the PSF option



Be sure there is no interfacts problems on result image (deringing,...)

Then reapply the DynamicPSF process (recalculate values)
Select 63 lines
Average button (but 1 star is not conform and must be deleted because it choose "gaussian" instead of moffat)





average FWHM is  x=1.04 pix and y=0.96 pix  ! almost factor of 2  :D

Result : ANIMATED GIF to see deconvolution process with no change on noise or adding strange effect :




ZOOM by 2



Thanks again for this waited function !!! it is usefull  ;)
« Last Edit: 2011 July 19 06:19:26 by Philippe B. »

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #25 on: 2011 July 19 06:11:35 »
Nice work!
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Tool: DynamicPSF
« Reply #26 on: 2011 July 19 16:52:35 »
Hi Philippe,

Very nice example :)

Just a few tips to help you improve your results:

- Instead of generating a PSF image from the Average Star Data dialog, use the Export Synthetic PSF feature (the blue ball to the left of the Sigma button). These routines use very different approaches to generate an average PSF:

* The Average Star Data dialog computes the average PSF parameters, then uses them to generate the corresponding PSF model image.

* The Export Synthetic PSF feature generates all the PSF model images for the selected star(s) and then averages them. This is more like an empirical PSF because it doesn't assume an underlying PSF model function. In theory this approach is more accurate and more adaptable to the particularities of the image.

- On the first screenshot we can see that all the selected stars (at least those that can be seen on the DynamicPSF window) have fitted rotation angles around 170 degrees (the theta parameter) except one that has 4.12 degrees. This star is clearly an outlier and should be either removed or fitted using a different function that provides a more consistent result. Also, chances are that this object is not a star, but perhaps a background galaxy. To detect outliers more easily, use the Sort feature with different sorting criteria.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Tool: DynamicPSF
« Reply #27 on: 2011 July 19 17:41:17 »
Hi Steve,

Quote
With regards to using the information with the Decon tool, would you choose the exported synthetic PSF image in the View Identifier window on the External PSF tab of the Decon tool?

That's correct. Select the synthetic PSF from the drop down list below 'view identifier'.

Quote
Also, would you please expand on your explanation of MAD?

MAD stands for Mean Absolute Deviation. It is a very simple and robust statistic that, in the case of DynamicPSF, we use to measure the difference between a mathematical model (the PSF model for a star) and the actual data (the pixels sampled from the star image). For each sampled pixel:

- The model function is used to compute a pixel value. Call it f.
- The difference between the computed value f and the actual pixel value v on the image is calculated: f β€” v
- The absolute value of the difference is calculated: |f β€” v|

Now if we add all the absolute differences and take the mean of the N sampled pixels, we have the MAD:

MAD = Sum( |f β€” v| )/N

Computed this way, MAD is a very good estimate of the suitability of the model function to reproduce the observed data.

However, bear in mind that MAD values are always relative estimates. The computed PSF model functions can never reproduce the actual image data exactly for two main reasons: (1) the uncertainty due to the noise, and (2) the fact that the observed data does not follow the model function. In other words, observed stars are neither Gaussians nor Moffats; we use these functions just because they usually are good to approximate stars on CCD images. So we never get zero MAD values for real images, and MAD values always depend on the characteristics of each image.

Quote
could you briefly explain the MAD number and what number constitutes a good fit versus a poor fit.

Use MAD numbers as the relative estimates that they are; never take them as absolute quality estimates. For example, if you have MAD=10-4 for some stars and MAD=10-2 for other stars, then you know that the first set is being fitted better than the second set by two orders of magnitude. Two orders of magnitude is a BIG difference (100 times), so you'd better remove the second set of star measurements, or maybe regenerate them using different parameters and see if the fitting quality improves.

Why have we included the MAD parameter in DynamicPSF? Because we don't like image analysis tools that don't tell you how good or bad are the analyses being made. Such tools are useless toys because they don't let you know what you are doing; using them is like shooting in the dark. In PixInsight you always know what you are shooting at β€”or that's the intent ;)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: New Tool: DynamicPSF
« Reply #28 on: 2011 July 19 18:48:46 »
It would be really terrific if the updater could remember by user name and password for the distro site. A minor inconvenience for the wonderful auto update but really a licensed copy of PI should know how to update itself without requiring uid/passwd.

Harry: watch for bed posts while fumbling in the dark.

Good idea!

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: New Tool: DynamicPSF
« Reply #29 on: 2011 July 20 00:07:42 »
The error message is a bit misleading and I'm not sure why there is an instance icon in this case ...

For instance, it allows you to create a process icon. If you have data in the DPSF dialog when you create the process icon, of course, the images will need to be open when you re-invoke the process icon in order for the DPSF tool to calculate the values. Otherwise you could have/save a process icon with your favorite "default" parameters...