Author Topic: PSFEstimation script  (Read 63381 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PSFEstimation script
« Reply #75 on: 2013 May 15 11:16:46 »
or maybe this was never released officially? i just can't remember.

Offline andre germain

  • Newcomer
  • Posts: 9
Re: PSFEstimation script
« Reply #76 on: 2013 May 16 05:11:15 »
And the wait became too long...Too bad my demo license expired yesterday - I guess PixInsight won't figure in my future  :-[ Automation is a very important part of my automated observatory and these scripts were part of the solution.

Cheers

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #77 on: 2013 June 12 11:34:20 »
Here is a release of PSFEstimator for 1.8. Sorry for the delay.

https://dl.dropboxusercontent.com/u/109232477/PixInsight/PSFEstimator.0.34.js

The change uses Juan's and Collin's convolution threshold suggestion, along with an additional false positive rejection technique. Also some minor 1.8 dialog styling changes.

You may see slightly different sets of stars selected for the analysis, this is to be expected. The results should match 1.7 closely. The script continues to use the StarDetector process rather than Juan's star detector script.

Tested on Win7 and MacOSX 10.7.

SubframeSelector is not yet ready.

Thanks,
Mike

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PSFEstimation script
« Reply #78 on: 2013 June 12 18:11:44 »
thanks Mike.

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: PSFEstimation script
« Reply #79 on: 2013 June 12 18:32:56 »
Great. Tnx, Mike-
-Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: PSFEstimation script
« Reply #80 on: 2013 June 13 04:58:27 »
many thank, Mike

Cheers


Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #81 on: 2013 June 13 12:22:50 »
Here is a release of SubframeSelector for 1.8. Again, sorry for the delay.

https://dl.dropboxusercontent.com/u/109232477/PixInsight/SubframeSelector.0.6.zip

Changes are similar to those for PSFEstimator mentioned above, along with a Tabulation/Plot/SaveAs file naming bug fix. Tested on Win7 and MacOSX 10.7.

To install the script, first unzip the downloaded file, choose Scripts>Feature Scripts..., click Add, navigate to SubframeSelector.0.6/src and click Select Folder. The script should appear in Scripts>Batch Processing.

To read documentation, open SubframeSelector.0.6/doc/scripts/SubframeSelector.0.6.html in your browser.

You may also install the documentation into PixInsight. Choose Scripts>Development>Documentation Compiler, click Add Files, and add SubframeSelector.0.6/pidoc/SubframeSelector.0.6.pidoc. Click OK and the file and its assets will be compiled and installed in PixInsight's system install directory.

Once installed, you may view the documentation within PixInsight via Process Explorer>Scripts>Batch Processing>SubframeSelector.0.6. Make sure the Show/Hide Extensions button at the bottom of the explorer window is configured to show the documentation.

Thanks,
Mike

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PSFEstimation script
« Reply #82 on: 2013 June 13 16:53:11 »
Can these be released via Juans update mechanism, or are they still experimental?
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #83 on: 2013 June 13 18:35:51 »
Georg, not ready for official release.
Mike

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #84 on: 2013 June 17 20:15:14 »
Here is another script that measures FWHM on a single sub. It is easier to use than PSFEstimator. It produces a nice, simple table and nice plots. I use it more often than PSFEstimator now.

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

Select your view, click Measure to make the measurements, and click Support to see the plots. You will see values for star FWHM and Eccentricity.  Round stars have eccentricities less than about 0.44, much larger than that and they will start looking oval.

You can choose your star profile function and detection sensitivity. The defaults work well on my subs.

Tested with PixInsight 1.8RC7 on Win7 and MacOSX 10.7.

Thank,
Mike
« Last Edit: 2013 June 17 20:44:43 by mschuster »

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: PSFEstimation script
« Reply #85 on: 2013 June 18 02:41:49 »
Hi Mike
That's right, this new one is simple and very useful  ;)
Thank you very much for sharing !



Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PSFEstimation script
« Reply #86 on: 2013 June 18 12:42:06 »
Thanks Philippe.

As a companion to FWHMEccentricity, here is another new script that estimates a sub's contrast, noise and their ratio. The script focuses on trying to get a more robust estimate of background noise and gives a contrast-noise-ratio for sub quality evaluation purposes. I have had difficulty getting reliable noise estimates for my binned, narrowband subs, hence this script.

https://dl.dropboxusercontent.com/u/109232477/PixInsight/ContrastBackgroundNoiseRatio.0.4.js

Choose your sub, click Measure to see the measurements, and click Support to get a bicolor mask. By default, the script measures noise in only the dimmest 2 percent of the sub. You can select a different percentile.

The resulting noise measurement will typically be a composite of noise from several sources, including read noise, dark current noise, shot noise, confusion noise (i.e. noise from unresolved stars and galaxies), and also fixed pattern noise if the sub has not been calibrated. The script uses simple, robust statistical methods to eliminate contributions from object structures and cosmic rays to get a more reliable noise estimate. By restricting measurements to the dimmest percentile of intensity, the impact of the strongly intensity dependent shot noise contribution to the noise estimate is controlled.

The bicolor mask shows areas of the sub used for the measurement. You can composite this mask with the sub to better see these areas as follows. First stretch your sub, then rename the bicolor mask "support", then apply to the stretched sub the PixelMath "$target + 0.5 * support" with the options rescale off, create new image on and color space set to RGB.

Tested with PixInsight 1.8RC7 on Win7 and MacOSX 10.7.

Thanks,
Mike
« Last Edit: 2013 June 18 13:03:32 by mschuster »

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: PSFEstimation script
« Reply #87 on: 2013 June 19 02:45:49 »
I'm kind of embarrassed to ask this.  I've been reading about PSF for ages, but have no idea what it is used for.  From reading this thread it seems that the script is powerful and useful.  Trouble is, I have no idea what for.   :-[

Could it be used for star shaping?  eg I have some rotation in my field around the guide star due to slightly off polar alignment.  Could this be used to correct that?

Sorry for the dumb question.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PSFEstimation script
« Reply #88 on: 2013 June 19 08:04:09 »
it's kind of for testing your OTA/camera combination to see if your OTA is in collimation and your camera is not tilted. the shape of the stars is pretty much the Point Spread Function for your optical train, which is a measure of how the optics distort a point source of light.

CCDInspector is a commercial product which does something similar to the mosaic mode of PSFEstimation, you can check that out too.

the related script SubframeSelector measures the average PSF and a whole host of ancillary statistics about the PSFs across images so that you can judge which subexposures are good. it's a bit more objective than eyeballing them.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PSFEstimation script
« Reply #89 on: 2013 June 19 09:53:29 »
Hi Mike,

I have attached a new version of StarDetector.js to this post. This is an adaptation of the star detection routine that I have written for the next generation of the StarAlignment tool, which I'm going to release in a few days.

This version has the following main features:

* Much faster. You can use it now without performance problems in your scripts. Example 1: 1800x1300 image, 3100 stars detected in 1.40 seconds. Example 2: 4000x5000 image, 40,000 stars detected in 8.3 seconds. Benchmarked on a 6-core i7 990X workstation.

* More robust detection. The new algorithm is much more robust to detection of false star structures (such as small nebular features) and multiple/crowded stars.

* More accurate. The algorithm converges to valid centroid coordinates under difficult conditions such as nearby stars or nebulae, and diffraction spikes.

* The new detection algorithm is invariant to scale. This means that the same stars are now detected consistently for the same image, on small crops or on the whole image. This means also that the same stars are now detected for the same image under a wide range of scaling factors. Scale dependency was a severe limitation of previous StarAlignment versions.

The script now generates better control images (when the __TEST__ macro is #defined to a value > 0). In particular, the script generates a star mask with circles showing the dimensions of the detected star structures. Just select the star mask as a mask for the original image and apply an automatic screen stretch as necessary. The stars will be shown as red circles.

The algorithm no longer uses wavelet transforms to isolate structures (as this was the cause of the scale dependency that I have commented above). However, for the sake of compatibility, the structureLayers and noiseLayers parameters are still expressed as wavelet layers. I have written the structure detection phase in a way that mimics the wavelet-based implementation. Despite that, the structureLayers and noiseLayers parameters are much less sensitive in this version. This means that the difference between 4, 5 and 6 detection layers is not really important for most images, which is a good property because it contributes to the scale invariance of the algorithm.

Let me know if it helps, and keep up the nice work!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/