Author Topic: PSFEstimation script  (Read 63380 times)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #90 on: 2013 June 19 10:02:04 »
Thank you so much Juan, I will test! This sounds like a big improvement over the older script which I decided not to use due to its results and performance.
Mike

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #91 on: 2013 June 19 10:07:36 »
Troy,

Star diameter appears to vary with star brightness, the FWHM metric on the other hand, because it normalizes flux profiles, tends to give the same number independent of brightness.

Here is the result of my FWHMEccentricity script on a sub taken last year.



The median FWHM is about 1 pixel, which means that one half of a typical star's flux is concentrated within a diameter of 1 pixel. The sub was binned 2x2 with a fairly coarse image scale of 4.2 arcseconds per pixel. Seeing, focus, tracking and collimation were all good, which accounts for the small FWHM value.

Median Eccentricity is a measure of typical star shape, the degree of its roundness or ovalness. Values less than 0.44 are usually considered round.

Of course, FWHM and Eccentricity may vary across the sub due to optical aberrations, tilt, field rotation and what not. The script produces plots to help you see this. You can see that FWHM was slightly higher in two corners.





The script also produces a plot that shows which stars were measured, and also how well the chosen model function fit the star's profile, from negative (better than median fit), to 0 (median fit) to positive (worse than median fit).



The other scripts do similar things, one of them is a batch version, and they also provide information about noise and contrast. For star measurements on single sub I prefer FWHMEccentricity due to its simplicity.

Thanks,
Mike

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #92 on: 2013 June 19 12:00:17 »
Hi Juan,

Your new script is working extremely well so far. Thank you!

I concur, faster than existing SA and much faster than the old SD script, and better at finding stars than existing SA and much better in this regard to old SD.

I concur, robustness appears superior, but have not tested sufficiently. Have not yet tested scale invariance.

I concur, layer parameters are much less sensitive. For the time being I will continue to use 4/2 as with existing SA. (FYI: defaults are actually 5/0 but comments say defaults are 4/1).

With 4/2 script detects more stars (1.25x to 2x more) in less time than SA on certain subs.

I am testing more now. So far no problems.

Thanks,
Mike

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #93 on: 2013 June 20 10:06:11 »
Here is an update to the script FWHMEccentricity, which measures subexposure star shapes. It includes Juan's new star detector that he describes above. This new detector is a significant improvement in results, robustness and performance. The script also includes Juan's script programming recommendations (no with statements, no unrooted controls, and no restyle() calls). Tested for 1.8 RC7 on Win7 and MacOSX 10.7. The script produces results slightly different than earlier versions, this is to be expected due to the differences in star detection.

Thanks,
Mike

https://dl.dropboxusercontent.com/u/109232477/PixInsight/FWHMEccentricity.0.6.js

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: PSFEstimation script
« Reply #94 on: 2013 June 20 13:48:18 »
Thanks for the reply, Mike.  If I understand correctly from your post, and also some PM correspondence as well, it's possible that if your script estimates the PSF for all stars over the image, a script to deconvolve using it could be developed to correct star profile shapes?

Say you've used a star in the bottom right of your image and there's a slight field rotation.  Stars top left show the worst effects of circumferential lengthening about the guide star.  If your PSF script can represent what's going on mathematically, a script could be written to correct the rotation and tighten the stars up?  Might be like a gradient correction because the most needing it would be top left while bottom right would need nominal correction?

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #95 on: 2013 June 21 08:20:11 »
Hi Troy, yes, spatial varying deconvolution is possible. I have implemented one technique (see reference) in Matlab. It is work in progress. With the current version on my undersampled subs, I like very much how it enhances subtle, low contrast nebula detail, but I don't like the ringing on the small stars. I don't yet have a solution for this problem.

Thanks,
Mike

Oliveira, et al., "Adaptive Total Variation Image Deconvolution: A Majorization-Minimization Approach", Signal Processing, vol. 89, issue 9, pp. 1683-1693, Sep 2009.

Offline tscottt

  • Newcomer
  • Posts: 8
Re: PSFEstimation script
« Reply #96 on: 2013 July 25 06:55:04 »
Mike,

This script looks fantastic.  I tried to download it today, and the dropbox link seems to be broken.  Is there an alternative way to obtain it?

-Scott

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #97 on: 2013 July 25 07:19:20 »
Hi Scott,

Please see this post.

Please try the script FWHMEccentricity. It is an easy to use replacement for PSFEstimator. The batch version SubframeSelector is also available from the post.

Please also be sure that your 1.8 RC7 version is upgraded to the most recent version.

Thanks,
Mike

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: PSFEstimation script
« Reply #98 on: 2013 September 15 05:48:27 »
Any way to still download this script somewhere? The dropbox link isn't working (anymore).

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #99 on: 2013 September 15 10:13:59 »
Hi Chris, please try the script FWHMEccentricity, which is now available as part of the standard PI 1.8 update mechanism. PSFEstimation is obsolete.
Thanks,
Mike

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: PSFEstimation script
« Reply #100 on: 2013 September 16 12:24:47 »
Excuse my ignorance, but where should I be able to find it? I don't have it listed in my scripts overview?

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #101 on: 2013 September 16 13:31:58 »
Chris,

Please first try Resources > Updates > Check for Updates and update if necessary.

The script requires 1.8 RC7 Version 01.08.00.1022 or later so the update is important.

The script should appear as Scripts > Image Analysis > FWHMEccentricity.

If not there, please download it from the list in this post.

Install the download via Scripts > Feature Scripts... > Add. Select the folder containing the download. After an OK it should appear as above.

If this doesn't work, please let me know!

Regards,
Mike

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: PSFEstimation script
« Reply #102 on: 2013 September 17 00:16:16 »
Thanks Mike, I needed to install updates. This is a new install of the latest version of PI, so I wrongly assumed it was up to date :)

Offline Astrocava

  • PixInsight Addict
  • ***
  • Posts: 180
    • Astrocava.com
Re: PSFEstimation script
« Reply #103 on: 2013 September 20 08:31:34 »
First of all, thanks for making this incredible tool avalaible for all.

On the other hand, anyone have tried this with DSLR raw files? My first approach is to use the BatchFormatConversion script using "raw cfa" as input format hint and then using the output files with the SubframeSelector script. It have been useful to discard some subframes, but I don't know if it is correct to use the raw non-debayered data.

A more long workaround would be to debayer the images and then extracting the L component. One of the problems I have with this approach is the increase in file size from BatchDebayer because it saves the files in 32-bit format. I'm using a Canon 550D (14 bit depth) and the files grows to more than 200Mb (32 bit) from 35Mb (16 bit). I have an old computer and have several problems with memory.  I can use again BatchFormatConversion script to feed the SubframeSelector, but...

In my head is to use  the SubframeSelector script to help me with focus and need a fast method (my field computer is older :-))

Thanks in advance,

Sergio
Moonfish ED80 over a Meade LX200GPS 8"

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PSFEstimation script
« Reply #104 on: 2013 September 20 12:49:05 »
well, if using an OSC you have to debayer the frames first...

for focusing, you might be better off using the various focus quality metrics built into BackyardEOS. if you have a bright enough star available you can actually use live view to achieve focus. in addition the latest version can also understand a bahtinov mask diffraction pattern and give you feedback about the focus.

also there's some freeware for windows called "bahtinov grabber" that can take a (user defined) screenshot, and given the focal length of your instrument can determine if you are in the critical focus zone.

if you want to try this script then maybe the best thing to do is just set the camera to take JPGs while trying to focus?

rob