PSFImage - Script by Hartmut Bornemann to automate the creation of a PSF profile

Herbert_W

Well-known member
Hi,

I've waited a long time for this and now it's come true  :)
A script to automatically create a PSF profile of an image for further use in the Deconvolution module.
Thank you to Hartmut Bornemann for this new script. I have tested it on several images and it works very well!

Short explantion:
PSFImage can replace DynamicPSF and automate the creation of a PSF profile.
The script is applied to a view or preview and generates a profile image for use in deconvolution.
The criteria are the Moffat functions, the limitation of the amplitude and a setting for the sensitivity of the StarDetector.
All settings are saved. The result is displayed in the TextBox and commented on in the FITS header.


Download: https://www.skypixels.at/pixinsight_scripts.html

Please send questions to Hartmut - he is represented in this forum: hvb356

Best regards!
Herbert, Austria

PSFImage_large.jpg
 
A question has come up on another forum about whether this should be used on a linear image or a nonlinear image or does it matter?

Larry
 
generally speaking star PSFs are destroyed (in the sense that the nonlinear stretch messes up the profile and can saturate the center of the star) and so all PSF extractions should always be done on linear data.

rob
 
The PSF tool is normally used for deconvolution in linear image processing. Deconvolution can also be used for refinement in the non-linear range. You can also use PSF, but I personally use nonlinear the Parametric PSF.

Gerhard
 
Rob, you give me the reason why I avoid PSF in the nonlinear area more intuitively.  Thanks

Gerhard
 
Thank you very much Hartmut!

This is now part of my "must-do" workflow in PixInsight.

I am very grateful!!!

Have a great New Year!!!

Jeff in Canada
 
Hi Jeff,

it's a pleasure for me.

A successful and happy New Year to you and the PixInsight community

Hartmut
 
GJL said:
Rob, you give me the reason why I avoid PSF in the nonlinear area more intuitively.  Thanks

Gerhard
Well, the practical way to see the difference is to use dynamic PSF on a linear image and then stretch the image and repeat. You?ll find the PSFs of different stars are very similar in the linear case and all over the place in the nonlinear case.

The reason we measure a PSF is almost always as a prelude to deconvolution.  The image we have from the camera is a result of the source being convolved with atmospheric distortions and instrumental defects.  Deconvolution tries to reverse this process, so it needs a consistent PSF measurement throughout the image. Stretching removes this consistency.
 
I am having a problem with PSFImage - it has worked fine for me in the past - even earlier this year, but I have applied some updates to PixInsight and I am wondering if there is a problem or if I need to re-install.

I bring up the script and click on the evaluate - it runs fine and shows me the PSF image that it has calculated.  Then I click on the create button, and I see the PSF image flash on the workspace - but it immediately disappears.  When I OK out of the script - there is no PSF image like there normally is after the script runs. 

My PI version is:  1.08.06.1457

Help would be greatly appreciated!
 
anything relevant in the console log? any errors?

is it possible the PSF image ended up on another workspace somehow?

rob
 
Hi - thanks for the response!  I don't see anything in the log that looks like an error.  There is this warning:

** Warning [290]: C:/Program Files/PixInsight/src/scripts/PSFImage.js, line 217: mistyped ; after conditional?
if (progressValue > 0);
.....................^

I've attached the full log to this post.  I also checked all the other workspaces and minimized all the objects - can't find it anywhere.  Usually the psf image is sitting on the workspace - it may be behind another image or process icon, but it is usually there.
 

Attachments

  • PSFImage_log.txt
    2.7 KB · Views: 111
I have a laptop which has PI 1.08.05.1353 on it - and the PSFImage script runs fine on it...  So I was able to copy my image over to that machine and create the psf image file... but I would still like to get the desktop fixed - hopefully without reverting to the 05 release.

John
 
Thanks Rob for pointing me to line 217. The corrected script is ready for download from https://www.skypixels.at/pixinsight_scripts.html and from my repository.

Regards

Hartmut
 
i have the same issue but as a PI newbie I didn't realise it was an issue - just thought I was doing something wrong.  Like others here, I hunted across all the workspaces looking for the little guy - but it was nowhere that I could find.  So I just pressed the create button again a couple more times and then hey presto - all the images appeared in a little stack in the middle of the workspace.  Perhaps you might like to try this and see if it works for you too.  I think I have the latest version of the script as I have just installed PI on a new PC but will run an update to be sure.
 
ok, so I have only just heard about this tool (so apologies for the bump). I gather this is a prelude to deconvolution (which I have not attempted yet). A couple of questions tho.
1. which Moffat should I use (are there rules to choose between them?) I assume this is some kind of mathematical model
2. I just ran it on one of my linear images (using the top Moffat) and it gave a very pixelated (blocky) looking star. Is that to be expected? Can one improve the resolution? Or maybe one doesn't need to?
Thanks
 

Attachments

  • Capture.JPG
    Capture.JPG
    187.8 KB · Views: 92
Hello @StuartT
I'm not sure about 1 so I'm just going to answer your 2nd question.
Of course the psf will be highly dependent of your image's sampling but your example seems ok to me. Furthermore I believe it's not as pixalated as you may think. Just try to do an STF on your psf and you'll have a better representation of your stars.
 
Hello @StuartT
I'm not sure about 1 so I'm just going to answer your 2nd question.
Of course the psf will be highly dependent of your image's sampling but your example seems ok to me. Furthermore I believe it's not as pixalated as you may think. Just try to do an STF on your psf and you'll have a better representation of your stars.
thanks. You are right. An STF did the job! I was particularly happy with my guiding on that image - it was just 1/3 of my image scale :)
 
Back
Top