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

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
New Tool: DynamicPSF
« on: 2011 July 17 10:03:52 »
Hi all,

Today we have released a new tool: DynamicPSF. This long-awaited tool fills an important gap in the set of image analysis tools of PixInsight that we have been suffering during years.

While we write documentation[1], let me make a brief description and an overall introduction to the features and practical usage of this essential tool.

As its name suggests, DynamicPSF is a dynamic PixInsight tool for PSF (Point Spread Function) modelling. In a nutshell: you click on an image and DynamicPSF looks for a star (or a star-like object) around the coordinates you have clicked at. If something like a star can be found close to those coordinates, DynamicPSF tries to fit a three-dimensional function from a set of sampled image pixels. It then provides a number of useful parameters that describe the PSF in terms of the function fitted.

The practical usage of DynamicPSF is quite similar to that of DynamicAlignment. In fact, I have reused a number of routines and algorithms from DA to write DynamicPSF, although I have reformulated and improved all of them significantly (among other things, this means that you can expect a new version of DA after Summer, including an interactive mosaic building feature and improved accuracy).

This initial version of DynamicPSF can fit elliptical Gaussian and Moffat[2] functions. An elliptical Gaussian PSF fitting function is defined as:



where the parameters are:

B - Average local background.
A - Amplitude, which is the maximum value of the fitted PSF, and also the function's value at the centroid coordinates.
x0,y0 - Centroid coordinates. This is the position of the center of symmetry of the fitted PSF.
sigmax, sigmay - Standard deviation of the Gaussian distribution on the horizontal and vertical axes, measured in pixels.

An elliptical Moffat function is given by:



where the parameters are as above and the beta exponent controls the overall shape of the fitting function. When beta = 1, the above equation corresponds to a Lorentzian distribution.

In all cases the functions are fitted to ensure that sigmax >= sigmay.

DynamicPSF also supports rotated functions. When the difference between sigmax and sigmay is larger than or equal to 0.01 pixel (which is the nominal fitting resolution), DynamicPSF fits an additional theta parameter, which is the rotation angle of the X axis with respect to the centroid coordinates, in the range [0,180[ degrees. For a rotated PSF fit, the x and y coordinates in the equations above must be replaced by their rotated counterparts x' and y', respectively:



Rotation angles are measured in counter-clockwise direction.

For those users more technically inclined, DynamicPSF implements the Levenberg-Marquadt algorithm as a model trust region minimization procedure (the algorithm minimizes the mean absolute deviation of the fitted function from the sampled data). The underlying implementation is a custom adaptation of the CMINPACK library to the PixInsight/PCL framework.

For all fitted PSFs DynamicAlignment computes a set of additional parameters:

FWHMx - The full width at half maximum on the X axis. FWHM is a well-known, simple and easy to understand measurement of the size of a star as seen on the image.

FWHMy - The full width at half maximum on the Y axis. For circular functions, we have FWHMy = FWHMx.

MAD - The mean absolute deviation of the function fitted with respect to the actual sampled pixel values. This parameter is a robust estimate of the goodness of fit, or in other words, it tells you how well a star can be represented by the fitted function. Higher MAD values denote comparatively poorer fitting quality.

DynamicPSF can also search for the function that best represents the sampled image data in terms of minimizing MAD. Finally, instead of fitting elliptical PSFs you can tell DynamicPSF to fit circular functions, where sigmax = sigmay and theta = 0. For raw images with high noise levels and/or strongly undersampled images circular functions can usually be more robust and hence preferable (robustness is an extremely desirable property in the PSF modelling problem). The uncertainty introduced by additional parameters (two axes and a rotation angle) can lead to meaningless results for these images.

Now the obvious question is: what is DynamicPSF useful for? This question has many and interesting answers. Modelling the PSF of an image or a set of images allows us to make quantitative assertions on important acquisition and instrumental conditions, such as seeing, tracking quality, focus quality, optics performance and focal plane geometry, among others.

There are much more details and practical usage considerations than this introduction, which we'll try to cover in the documentation. I just hope these notes will help you start using this new tool, which is the result of an intense development work we've been undertaking for several months. Please feel free to ask anything related to this tool in this thread and we'll try to do our best to solve your doubts. As is customary in all PixInsight implementations, DynamicPSF is the high-precision and highly versatile image analysis tool that our users need and deserve.

Enjoy!

__________________

[1] You can rest assured that we'll write documentation for this tool. These release notes will be reused to write the documentation, so this text is not a waste. So it is really not necessary that you insist in this regard :)

[2] Moffat, A. F. J., A Theoretical Investigation of Focal Stellar Images in the Photographic Emulsion and Application to Photographic Photometry, Astronomy and Astrophysics, Vol. 3, p. 455 (1969)
« Last Edit: 2011 July 17 10:10:06 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #1 on: 2011 July 17 10:26:28 »
Completely over the top in typical PI style but very impressive!  ;)
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 Redshift

  • PixInsight Enthusiast
  • **
  • Posts: 83
Re: New Tool: DynamicPSF
« Reply #2 on: 2011 July 17 11:50:04 »
Hi,

I've done the update but can't find this tool.

Dave

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #3 on: 2011 July 17 11:52:20 »
It's under 'Image'.
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 #4 on: 2011 July 17 11:53:01 »
Hi Dave,

Sorry, I forgot to mention this. You'll find DynamicPSF under the Image category on the Process Explorer window.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: New Tool: DynamicPSF
« Reply #5 on: 2011 July 17 12:53:19 »
Hi Juan

Thats great and thanks for the explanation , I really understood all of that  :o ??? ::)

But I will suss it out with the tried and trusted harry method , consisting of fumbling around in the dark till I find the light switch  ;D

Harry
Harry Page

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #6 on: 2011 July 17 13:17:13 »
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.
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 twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: New Tool: DynamicPSF
« Reply #7 on: 2011 July 17 18:24:27 »
Juan,

How do you use this tool?  When I drag the New Instance icon over an image, it states the following "DynamicPSF can only be executed in the global context".  Unfortunately, there is no Apply Global icon available and F6 doesn't seem to work.

Wade

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #8 on: 2011 July 17 18:27:20 »
The error message is a bit misleading and I'm not sure why there is an instance icon in this case but Juan did describe the basic usage quite well above:

"In a nutshell: you click on an image and DynamicPSF looks for a star (or a star-like object) around the coordinates you have clicked at."
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 twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: New Tool: DynamicPSF
« Reply #9 on: 2011 July 17 22:45:41 »
Sander,

Thanks!  I missed that part.  I saw all the mathematical formulas and my eyes glazed over.  :)

I'll make sure I read everything next time.

Wade

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #10 on: 2011 July 17 22:57:21 »
No problem. I did the same thing the first time. Then I figured Juan probably wrote how to use it besides slamming us with nifty formulas so I took a closer look at the post :)
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 Redshift

  • PixInsight Enthusiast
  • **
  • Posts: 83
Re: New Tool: DynamicPSF
« Reply #11 on: 2011 July 17 23:01:48 »
Sander and Juan,

Thank you, I've found it. It's greyed out though how do I make it active?

Thanks in anticipation.

Dave

Right. I've updated PI, I've checked the installed updates which indicates that it's been done successfully, there's a mention of Dynamic PSF. But in actual fact the tool is not in the image menu. What I thought was it, is in fact, Mode>Dynamic operation.

I'm using the Mac 32 and 64 bit version.

Dave

Forget this now. There's been another update which resolves my problem.

Thanks
Dave

« Last Edit: 2011 July 18 02:03:01 by Redshift »

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: New Tool: DynamicPSF
« Reply #12 on: 2011 July 18 02:06:43 »
Juan, you are the best of the best  :-*


Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: New Tool: DynamicPSF
« Reply #13 on: 2011 July 18 05:55:01 »
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.
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 Yuriy Toropin

  • PixInsight Addict
  • ***
  • Posts: 209
Re: New Tool: DynamicPSF
« Reply #14 on: 2011 July 18 09:11:14 »
Great addition, thanks a lot!

Couple of special "wishes" related to DynamicPSF
1) is it possible to add PSF info to the data shown in "preview window" of the Readout Mode? So that when cursor will be placed over the star on the image PSD statistics will be shown?
This will be real "dynamic" way of examining image...
2) easy way to auto select stars and generate some "average" FWHM for the whole frame will be great.