I'd like to share a new script. Something like this may already exist, but I am new to PI and easily may have missed it.
PSFEstimation provides a simple way to estimate the point spread function (PSF) and other parameters of a target image.
Stars are detected automatically by StarAlignment's star detector. You can specify parameters to that process. The script generates a map of detected stars so you can double check your settings. The script then applies the DynamicPSF process to the detected stars and reports the medians and median deviations of the results.
In contrast to running DynamicPSF manually, you loose the ability to be selective in your choice of stars to fit, but you gain the ability to quickly analyze subexposures, calibrations, registrations and integrations.
Strictly speaking, the script should only be applied to linear images. But it does seem to provide some useful information for nonlinear images as well. RGB images are converted to Grayscale prior to PSF estimation.
When you click OK, the script runs its process and then opens a second dialog with the results, and optionally an additional window with visualizations. The result fields have tool tips that provide helpful information.
Comments welcome.
The script dialog.
Results dialog.
Visualization (generated when the Mosaic size parameter is 3 or larger):
Thanks,
Mike
Known bugs:
- Due to a previously reported issue, StarAlignment will abort PSFEstimation if it finds no stars. After clicking OK to dismiss the error dialog, try again with more permissive star detection parameters.
0.2 changes:
Added source view to dialog.
Added AvgDev eccentricity to results.
Decreased default detection sensitivity value.
0.3 changes:
Fixed non 32-bit floating point sample bug.
Increased limit on maximum number of stars fitted.
Changed fitted star map to Grayscale.
Improved performance.
0.4 changes:
Fixed zero fitted stars bug.
0.5 changes:
Increased default detection sensitivity value.
Fixed StarAlignment stars view id bug.
Cleanup code.
0.6 changes:
Added new instance button to parameters dialog.
0.7 changes:
Added new instance button to results dialogs.
0.8 changes:
Allow dialog to open with no active view.
0.9 changes:
Fixed fitted star map bug.
0.10 changes:
Fixed no target view bug.
Preserve STF in star map views.
Removed duplicate fits.
0.11 changes:
Added Save As.. CSV file button.
0.12 changes:
Fixed missing directory bug.
0.13 changes:
Handle 'Execute in the global context' command.
0.14 - 0.18 changes:
Many improvements.
0.19 - 0.28 changes:
Many improvements.
0.29 changes:
Fix MacOS dialog layout bugs.
Impose maximum per panel and total fitted star limits.
0.30 - 0.32 changes:
Use MedDev rather than AvgDev for robustness.
Set defaults to Moffat4 and Eccentricity.
Add MRS Noise and SNR Weight.
Remove Median (background) visualization.
0.33 changes:
Added per star PSF information to the .csv file.