New Scripts: PixInsight Toolbox

Dick Berkhemer and Mirage502,

Sorry for your inconvenience. This sounds strange. Already a lot of PixInsight users from the "DarkMatters" discord server are using and testing these scripts without installation problems. Please check if the scripts menu does not contain a folder "Toolbox"? I will provide a new version soon with several improvements, not sure if this would perhaps solve your problems.

Its hard to find such problems when I cannot see it. Can you please check if my developer id is listed in the console? You will need to enter 'lscpd' into the console and you should get a list of all certified PixInsight developers. In this list you should see "JuergenTerpe", otherwise my certificate is missing. Please also check if you have the newest PixInsight version installed, which is currently version 1.8.9-1. Otherwise, I believe these script packages are ignored. Please let me know if this was the case.

Sorry and best regards,
Jürgen
Jürgen, I checked using the console and discovered that your certificate is missing from my install. I have version 1.8.9-1 installed
 
This is probably not a big deal. Just remove the path to the scripts and run "Check for Updates". You should receive an updated developer certificate database and then you can add my scripts and PixInsight will know the certificate.
 
I tried this and it did not work. I even tried to run things in safe mode and that didn't work either. Neither Toolbox nor EZ scripts will work. Still can not find your credentials in the console when I type in " lscpd " The scripts module shows up under installed packages but is not recognized by the program. So frustrated I cant make this work.
 
Dick Berkhemer and Mirage502,

Sorry for your inconvenience. This sounds strange. Already a lot of PixInsight users from the "DarkMatters" discord server are using and testing these scripts without installation problems. Please check if the scripts menu does not contain a folder "Toolbox"? I will provide a new version soon with several improvements, not sure if this would perhaps solve your problems.

Its hard to find such problems when I cannot see it. Can you please check if my developer id is listed in the console? You will need to enter 'lscpd' into the console and you should get a list of all certified PixInsight developers. In this list you should see "JuergenTerpe", otherwise my certificate is missing. Please also check if you have the newest PixInsight version installed, which is currently version 1.8.9-1. Otherwise, I believe these script packages are ignored. Please let me know if this was the case.

Sorry and best regards,
Jürgen
I am not sure why, but your name is not listed in my install. Do I need to uninstall and reinstall PI to get the credentials to reload?
 
Sorry for this late reply! No, when you are already on version 1.8.9-1 there is no need for an update or reinstallation, if your installation is working well. EZ scripts are not code-signed, so maybe you will need to wait until a new version is available, which is code-signed or you will need to enable running unsigned scripts... or try to get the scripts and install them via Feature Scripts.

My scripts are code-signed, so all you need is to run "check for updates" and you should get all developer certificates. After restarting PixInsight you should find my code signature identifier "JuergenTerpe" when typing "lscpd" in the process console. If this does not work there is something very wrong. Maybe, there is a way to reset everything and to reinstall all updates again. You can try "Manage Update Repositories" and press the "Default" button, hopefully this will cleanup everything. Maybe, your update repository was damaged for any reason.

Finally, a reinstallation should also help when everything was removed - but I would recommend this only if nothing else helped.
 
Hello everyone,

I have written several scripts which might be useful especially for those of you using a OSC camera. The scripts are implemented especially to help beginners in PixInsight to produce good results but might also be useful to more advanced PixInsight users. All scripts are really simple, no rocket sciences, but helpful. The following 7 scripts are currently available:

AutoLinearFit: Does a linear fit on all three color channels and recombines them to the image again. You can choose the channel with the lowest mean (lowest signal) or with the lowest noise or just select the red, green or blue channel as a reference for the linear fit. This script is a time safer.
CreateHDRImage: Creates a second image, processes the HDRMultiscaleTransform on it and blends it with the original image. You can see the result of this in a smaller preview window and can easily adjust your HDR settings.
CombineImages: Combines two images using PixelMath, but without the need to understand PixelMath. Even for those comfortable with PixelMath this script might be a time safer. And you will see your combined image result as a preview.
ImproveBrilliance: You should create some previews of some regions of interest before using the script! Now you can select one of these previews and you can adjust the image contrast, the sharpness and other things to make your image look more brilliant. Switch between different previews to see your changes. Behind the scenes the script will extract the luminance from your image and will add contrast, a LocalHistogramEqualization and some sharpening before it combines the luminance with your image. All settings are limited to some useful ranges so you will not be able to do too much.
CreateHubblePaletteFromOSC: The script extracts Ha, OIII and SII from your OSC image and combines them as a Hubble Palette. You can select different schemes such as HOO, HOS, HSO, OSH... The resulting image will be stretched using the excellent GeneralizedHyperbolicStretch PixelMath expressions and you can change the symmetry point in relation to the mean value of the Ha, OIII or SII channel and also stretch the channels differently. The results of your changes are shown in a preview window, so you can adjust your changes until you are satisfied. Keep in mind that this script requires enough data, especially the OIII channel requires enough exposures for good results.
ContinuumSubtraction: Some targets like M33 have some details in Ha and you can add Ha to your RGB image, but it requires to subtract the continuum spectrum from your collected Ha signal to get a clean Ha signal (filters always also let pass small parts of the continuum). Select the narrowband image with the Ha (collected using filters such as the L-Extreme) and the RGB image of the target, both registered to each other. Now change the amount of the continuum to be subtracted and you will see the results of your changes in the preview. When satisfied with your changes the script will create a new image containing just the Ha signal.
CombineHaWithRGB: After subtracting the Ha you can use this script to combine it with the RGB image. You can reduce the noise by adjusting the black point of your Ha image and you can decide how much H-Beta (blue or together with Ha magenta) the final image should contain. The script shows a preview of your final result until you are happy with the results.

You can find the PixInsight Toolbox Scripts repository under https://www.ideviceapps.de/PixInsight/Utilities/ and it can be added using Resources => Updates => Manage Repositories. I hope the scripts are useful for you. I'm still working on a better documentation and will continue to work on the PixInsight Toolbox scripts.

Minimum PixInsight version is 1.8.9-1,

Best regards and clear skies!

Jürgen Terpe
When I try to use this link I get the following error

1667483681644.png
 
This is exactly your problem. PixInsight still does not "know" my code signing identity for some reason. The certificates for code signing need to come by updating using "Check for Updates" and are published by the PixInsight server. For some reason this update does not come to your PixInsight installation, but this is required in order to install scripts from any developer. If you can't receive this update chances are high that you also cannot receive other updates provided by the PixInsight Team. Perhaps your update repository is in a wrong state. You can try to cleanup it by pressing the button "Default". This will remove all repositories except the updates from the PixInsight Team itself. Maybe, after doing updates with this configuration it will restore any corrupt state so you can receive all updates. If not, please ask in the forum for help by the PixInsight team itself. Maybe, in this special case a fresh clean installation is required to get rid of some trouble making files.
Bildschirm­foto 2022-11-04 um 10.15.41.png
 
There are now two more scripts available:

EnhanceNebula: This script brightens the nebula in an image. It uses StarNetV2 or StarXTerminator (whatever you have installed) to remove the stars and then just combines the starless image with itself using a luminance mask and adds the stars back. StarXTerminator sometimes seems to forget the AI model - in such cases the script might fail and you will need to open StarXTerminator and select the AI model again.

SelectiveColorCorrection: This script implements the "Selective Color Correction" functionality well-known from other image processing software like Photoshop. In fact you can achieve the same using color masks and CurvesTransformation, but this script creates a color mask for you and you can change the cyan, magenta, yellow and the luminance. I think this script might be helpful for beginners will be a time safer for those knowing how to do this in PixInsight. For more complex transformations the CurvesTransformation process is still the tool of choice, but in many cases there will be only small adjustments required and here the script can help.

Best regards,
Jürgen
 
Hi Jürgen,
A suggestion: (mac OS) can the Enter key validatee the typed-in numerical value in the entry fields instead of validating the OK button? I found myself launching the script inadvertently although I just wanted to validate the entry...
Thanks!
KR
Rodolphe
 
Thank you very much Juergen for your scripts. I like them very much.
The two I'm using the most are the CombineImages that I find more convenient to use that Pixelmath for this usage and the CreateHDRImages which is very effective to protect colors.
I have also used the ContinuumSubtraction and the CombineHaWithRGB scripts with great success.
Is there a reason not to use the standard Pixinsight Real time preview window in your scripts? The previews your have implemented are nice but I found them less convenient (for example you can't go back and forth between the original view and the preview).

Nico
 
Last edited:
Thank you very much Juergen for your scripts. I like them very much.
The two I'm using the most are the CombineImages that I find more convenient to use that Pixelmath for this usage and the CreateHDRImages which is very effective to protect colors.
I have also used the ContinuumSubtraction and the CombineHaWithRGB scripts with great success.
Is there a reason not to use the standard Pixinsight Real time preview window in your scripts? The previews your have implemented are nice but I found them less convenient (for example you can't go back and forth between the original view and the preview).

Nico
Thank you for your feedback, Nico - I'm very happy about it!

Using the PixInsight Real time preview would be indeed nice to have and it was really my preferred solution. Unfortunately, I was not able to find any way to get access to this preview from inside Javascript and I also don't know any script doing this. I believe this is currently impossible or just so hidden and undocumented, that nobody knows how to do this. I think, it is currently only possible from inside processes. If future versions will support it I would be glad to use it.

Best regards,
Jürgen
 
How do you add your developer ID to PI?
I'm not an expert, but the tricky part was to understand what the documentation says:

https://pixinsight.com/doc/docs/ScriptCodeSigning/ScriptCodeSigning.html

1.) You need to create a signing key as described in 11.1.
2.) Submit your signing key to become a CPD (Certified PixInsight Developer) as described in 11.2.
3.) Wait until you get an update in PixInsight for the developer certificates.
4.) Check if your account is available using lscpd from the Process Console.

If your certificate is registered you will see your identifier in the list shown in the Process Console when running lscpd. Now you can code sign your script(s) as described in the link above.

Regards,
Jürgen
 
Hello everyone,

I have written several scripts which might be useful especially for those of you using a OSC camera. The scripts are implemented especially to help beginners in PixInsight to produce good results but might also be useful to more advanced PixInsight users. All scripts are really simple, no rocket sciences, but helpful. The following 7 scripts are currently available:

AutoLinearFit: Does a linear fit on all three color channels and recombines them to the image again. You can choose the channel with the lowest mean (lowest signal) or with the lowest noise or just select the red, green or blue channel as a reference for the linear fit. This script is a time safer.
CreateHDRImage: Creates a second image, processes the HDRMultiscaleTransform on it and blends it with the original image. You can see the result of this in a smaller preview window and can easily adjust your HDR settings.
CombineImages: Combines two images using PixelMath, but without the need to understand PixelMath. Even for those comfortable with PixelMath this script might be a time safer. And you will see your combined image result as a preview.
ImproveBrilliance: You should create some previews of some regions of interest before using the script! Now you can select one of these previews and you can adjust the image contrast, the sharpness and other things to make your image look more brilliant. Switch between different previews to see your changes. Behind the scenes the script will extract the luminance from your image and will add contrast, a LocalHistogramEqualization and some sharpening before it combines the luminance with your image. All settings are limited to some useful ranges so you will not be able to do too much.
CreateHubblePaletteFromOSC: The script extracts Ha, OIII and SII from your OSC image and combines them as a Hubble Palette. You can select different schemes such as HOO, HOS, HSO, OSH... The resulting image will be stretched using the excellent GeneralizedHyperbolicStretch PixelMath expressions and you can change the symmetry point in relation to the mean value of the Ha, OIII or SII channel and also stretch the channels differently. The results of your changes are shown in a preview window, so you can adjust your changes until you are satisfied. Keep in mind that this script requires enough data, especially the OIII channel requires enough exposures for good results.
ContinuumSubtraction: Some targets like M33 have some details in Ha and you can add Ha to your RGB image, but it requires to subtract the continuum spectrum from your collected Ha signal to get a clean Ha signal (filters always also let pass small parts of the continuum). Select the narrowband image with the Ha (collected using filters such as the L-Extreme) and the RGB image of the target, both registered to each other. Now change the amount of the continuum to be subtracted and you will see the results of your changes in the preview. When satisfied with your changes the script will create a new image containing just the Ha signal.
CombineHaWithRGB: After subtracting the Ha you can use this script to combine it with the RGB image. You can reduce the noise by adjusting the black point of your Ha image and you can decide how much H-Beta (blue or together with Ha magenta) the final image should contain. The script shows a preview of your final result until you are happy with the results.

You can find the PixInsight Toolbox Scripts repository under https://www.ideviceapps.de/PixInsight/Utilities/ and it can be added using Resources => Updates => Manage Repositories. I hope the scripts are useful for you. I'm still working on a better documentation and will continue to work on the PixInsight Toolbox scripts.

Minimum PixInsight version is 1.8.9-1,

Best regards and clear skies!

Jürgen Terpe
Hi, thank you for your efforts!

but...the Selective Color script does not work on my MBP M2 - Ventura :(
It just hangs forver
Can I do something?

Thnk you again
Riccardo
 
Hi Riccardo,

To be honest I don't know what the problem could be. I'm using (and testing with an M1 Mac mini) and it works fine. The script is using PixelMath and CurvesTransformation processes, but both processes are not taking so long (I know there might be a performance problem with LRGBCombination process which is not used by this script). The only long running process might be to extract stars - in this case you must have checked "Create and use star mask" - this will take some time, but on Apple silicon Macs not very long.

I'm working on an update, but this might still take some days until I'm finished. Please check if you have other problems with PixInsight such as long running processes and your memory consumption. You can also check the folders configured in PixInsight to be used as swap storage. In past I had a lot of old files in these folders - if this is the case on your machine please quit PixInsight and clear the content of these folder(s), this might improve the performance. Another potential issue might be your memory consumption. If you have a lot of large images loaded into your workspace and only 8GB RAM this could slow down the performance - but for all PixInsight processes, not just this script.

If nothing helps please let me know. Then we should either wait until the update is published or I would need some more information in order to reproduce this issue - however it sounds like it is nothing that happens only sometimes on your machine. I'm using especially this script very often without any issue yet on my M1 Mac mini with 16GB Memory....

Best regards,
Jürgen
 
Hi, thank you for your efforts!

but...the Selective Color script does not work on my MBP M2 - Ventura :(
It just hangs forver
Can I do something?

Thnk you again
Riccardo
Riccardo,

just one hint about your issue. This script might be a little bit confusing at the moment, because the green button on the left-hand side just applies the changes to your image, but does not close the form. I think, the chosen icon was a bad decision from a UX perspective and I will change this in the next version (when I found a better icon for this purpose).
If your expectation was that the form will be closed - this is not the case and not the intention, because in most cases you will need to apply more than one change so it would be not the best solution to close the form and let the user restart the script. Otherwise, if this was not helpful for you please send me a screenshot of the process console so I can have a look at the currently running process started by the script.

Best regards,
Jürgen
 
Riccardo,

just one hint about your issue. This script might be a little bit confusing at the moment, because the green button on the left-hand side just applies the changes to your image, but does not close the form. I think, the chosen icon was a bad decision from a UX perspective and I will change this in the next version (when I found a better icon for this purpose).
If your expectation was that the form will be closed - this is not the case and not the intention, because in most cases you will need to apply more than one change so it would be not the best solution to close the form and let the user restart the script. Otherwise, if this was not helpful for you please send me a screenshot of the process console so I can have a look at the currently running process started by the script.

Best regards,
Jürgen
Hi Jürgen,
I open the script, click on the green tick
The console then reports "running" forever
if I close the script window no mask is generated
here is the screenshot

Thank you
rx
 

Attachments

  • cliclk green tick - hangs.jpeg
    cliclk green tick - hangs.jpeg
    759.4 KB · Views: 207
Riccardo,

This is normal behavior. The green checkmark button does not close the form and the script just does nothing more, because you just did not change anything. The script does not create a mask for you, it just creates masks for internal usage. You select the color channel (red was selected) and now you can change the saturation, luminance or the colors with the sliders. You will see the changes in the preview and finally you click the green checkmark button to apply your changes. This does just this, it applies your changes but does not close the form. Now you can make other changes without the need to restart the script.

The problem I think is that it is not so intuitive that the green checkmark button does not close the form, because it is not what you expected. I'm already aware of this 'issue' and will change the appearance of the button in the next release so nobody will expect the form to be closed. Sorry for this inconvenience...

Regards,
Jürgen
 
There are now two more scripts available:

EnhanceNebula: This script brightens the nebula in an image. It uses StarNetV2 or StarXTerminator (whatever you have installed) to remove the stars and then just combines the starless image with itself using a luminance mask and adds the stars back. StarXTerminator sometimes seems to forget the AI model - in such cases the script might fail and you will need to open StarXTerminator and select the AI model again.

SelectiveColorCorrection: This script implements the "Selective Color Correction" functionality well-known from other image processing software like Photoshop. In fact you can achieve the same using color masks and CurvesTransformation, but this script creates a color mask for you and you can change the cyan, magenta, yellow and the luminance. I think this script might be helpful for beginners will be a time safer for those knowing how to do this in PixInsight. For more complex transformations the CurvesTransformation process is still the tool of choice, but in many cases there will be only small adjustments required and here the script can help.

Best regards,
Jürgen
Anyone reading this and knows where i can find the script from Selective Color Correction?
 
Anyone reading this and knows where i can find the script from Selective Color Correction?
Sorry for your inconvenience!
You can install this package over Manage Repositories where you will need to add this address

https://www.ideviceapps.de/Pixinsight/Utilities/

There is no website, just the repository for these scripts. After restarting PixInsight you will find a submenu "Toolbox" within "Scripts", where all these scripts are located.

Regards,
Jürgen
 
Last edited:
Back
Top