New Scripts: PixInsight Toolbox

about selective color correction
disabling color management makes color the same in the preview window, but when I switch it back, colors are off obviously
Sorry, Riccardo, but at the moment I don't understand what you mean. I already fixed the preview to apply a color transformation and I can really see no difference in colors. If in doubt, please select another preview mode with a larger scaled image. This will result in a slower preview, but maybe the different scaling is your problem?
 
Sorry, Riccardo, but at the moment I don't understand what you mean. I already fixed the preview to apply a color transformation and I can really see no difference in colors. If in doubt, please select another preview mode with a larger scaled image. This will result in a slower preview, but maybe the different scaling is your problem?
Juergen

Does the preview apply a particular colour profile (ICC) to the image being processed? For people using custom colour profiles in their installation, the colour rendition will be different if so. Maybe this is what Riccardo means?

Roberto
 
Juergen

Does the preview apply a particular colour profile (ICC) to the image being processed? For people using custom colour profiles in their installation, the colour rendition will be different if so. Maybe this is what Riccardo means?

Roberto
In my understanding, it applies the same color profile used by the image being processed using applyColorTransformation, if this is what this method does. This method is called from the currently selected view and processes the bitmap to be rendered in the preview. So if my understanding is not wrong, the same color profile should be already used. The only thing which can make a small difference can be the resolution of the preview image, which can be changed to the original size of the view within the form of the script.

Jürgen
 
Juergen,

Absolutely what you have done with your Toolbox scripts and I have incorporated them into my workflow. Quick question on my end. Is there a way to reduce the amount of blur that the SelectiveColorCorrection mask is applying to the image?

Again, big thank you for everything you did making this tool!!

-Frank
 
Frank,

At the moment this is still not available, because on a first step I wanted to minimize the number of controls to make the things as easy as possible. But I already have this on my list for the next update. It is also planned to export the created mask and maybe - not sure yet, if this will be available in the next release - to use available images as masks.

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
Thanks much! The tools are very slick, and easy to use!
 
Hello Jürgen! Thank you very much for these tools. I find them incredibly valuable in my processing.

I think I may have found an issue with the CombineHawithRGB Script.

When I select RGB, Ha, and mask views the preview shows that the mask is working as intended and prevents the background from taking a reddish hue. However, when I apply the script to the target image it seems that the mask is ignored, applying Ha to the entire image resulting in a red background. It's possible I'm doing something incorrectly but the script seems pretty straightforward. Is there anything I can do to solve this?

Thanks

Mike
 
Hello Jürgen! Thank you very much for these tools. I find them incredibly valuable in my processing.

I think I may have found an issue with the CombineHawithRGB Script.

When I select RGB, Ha, and mask views the preview shows that the mask is working as intended and prevents the background from taking a reddish hue. However, when I apply the script to the target image it seems that the mask is ignored, applying Ha to the entire image resulting in a red background. It's possible I'm doing something incorrectly but the script seems pretty straightforward. Is there anything I can do to solve this?

Thanks

Mike
Thank you, Mike. Unfortunately, there is nothing you can do. I will check this as soon as possible. There will be an update required for another script (the one removing gradients), which requires an update to support a newer version. I will include this issue in my testing plan.

Regards,
Jürgen
 
Some important information for the users of the Toolbox scripts: starting with the next release all scripts will be code-signed again. Users with an older PixInsight version prior to build 1597 will have problems again with invalid code signatures. In such cases please consider updating your PixInsight. As a temporary workaround you can also go to your PixInsight installation folder into /src/scripts/Toolbox and remove the *.xsgn files for those scripts where you are facing problems. However, the new tools in the latest PixInsight version justify an update.

Regards,
Jürgen
 
So how exactly do you make this script work? It seems there's been various instructions provided, but using the repo link I cannot get the toolbox to appear. I attempted to use the "add" function in Feature Scripts and while I located the folder and got them to appear, running them seems to not work at all. Furthermore, launching PixInsight creates a long start up it seems.

EDIT: While trying to run some of them, Pix just fully crashes.
 
Which version and Build number of Pixinsight do you have installed?
Did you add the repository under Manage Repositories?
And maybe you tell more about your system.
The script doesn't delay the startup.

Cheers
Tom
 
Which version and Build number of Pixinsight do you have installed?
Did you add the repository under Manage Repositories?
And maybe you tell more about your system.
The script doesn't delay the startup.

Cheers
Tom
Apologies, should have put that in original post.

1.8.9-2 Build 1605. Script was initially attempted to be installed via adding the URL to the Manage Repositories section, with all the normal steps one takes after to actually get the script installed. After restarting and checking for the script, I noticed it was not present and proceeded with the aforementioned steps to manually add them. That made the Toolbox appear, but none of the scripts work/some cause a full crash.

It seems that Pix locks up at the "creating component windows" and "Installing Modules" stages of startup. Task Manager Reports Pixinsight as not responding and it persistently flashes, with command prompt windows sometimes appearing and disappearing quickly. After a minute or two, it finally launches.

With Pix open, but sitting on half my screen while I type this post, I am noticing that is seems to almost be closing and reopening. I still had the process console open and noticed that Pix disappeared from the screen and from the open program in the Taskbar, only to reappear. It did this several times over maybe 2 seconds. In doing so, that automatically closed the Process Console. I've never had this problem before.

Once launched:

The process console shows "62 of 62 module(s) installed", with 5 modules having a "?" at the start (" ? C:/Program Files/PixInsight/bin/GeneralizedHyperbolicStretch-pxm.dll "

When launching script, like AutoLinearFit, I get a long error in the Process Console. The start of it says:

Processing script file: C:/Program Files/PixInsight/src/scripts/Toolbox/AutoLinearFit.js

* Code signature verified:

script-id : AutoLinearFit

developer-id : JuergenTerpe

timestamp : 2024-04-14T15:57:59.369Z

*** PCL Win32 System Exception: At address 00007FFF9DD0F28E with exception code C0000005 :

Access violation: invalid memory read operation at address FFFFFFFFFFFFFFFF



*** Backtrace Information ***


Hardware is fine on the system. 13900K, 4090, 64gb of RAM, 3 NVME Caching drives, so there should be zero bottlenecks. Running Win10.
 
Apologies, should have put that in original post.

1.8.9-2 Build 1605. Script was initially attempted to be installed via adding the URL to the Manage Repositories section, with all the normal steps one takes after to actually get the script installed. After restarting and checking for the script, I noticed it was not present and proceeded with the aforementioned steps to manually add them. That made the Toolbox appear, but none of the scripts work/some cause a full crash.

It seems that Pix locks up at the "creating component windows" and "Installing Modules" stages of startup. Task Manager Reports Pixinsight as not responding and it persistently flashes, with command prompt windows sometimes appearing and disappearing quickly. After a minute or two, it finally launches.

With Pix open, but sitting on half my screen while I type this post, I am noticing that is seems to almost be closing and reopening. I still had the process console open and noticed that Pix disappeared from the screen and from the open program in the Taskbar, only to reappear. It did this several times over maybe 2 seconds. In doing so, that automatically closed the Process Console. I've never had this problem before.

Once launched:

The process console shows "62 of 62 module(s) installed", with 5 modules having a "?" at the start (" ? C:/Program Files/PixInsight/bin/GeneralizedHyperbolicStretch-pxm.dll "

When launching script, like AutoLinearFit, I get a long error in the Process Console. The start of it says:




Hardware is fine on the system. 13900K, 4090, 64gb of RAM, 3 NVME Caching drives, so there should be zero bottlenecks. Running Win10.
This sounds not so good! Something strange is going on your system! The scripts don't interact directly with any Win32 component, they just call processes from PixInsight and are executed inside the JavaScript engine. First of all, I would restart my computer in this case. As a second step I would clean all PixInsight cache folders and would run an "Reset Updates", followed by restarting PixInsight.

If the same issue still occurs, you should check if all processes are still working and if you can run other scripts (to check if the JavaScript Engine is still working). Normally, the scripts should appear after the update automatically - it is always a bad sign, if this does not happen (in this case something went wrong, so PixInsight was unable to add them to the script menu).
If nothing else helps: my final recommendation would be to uninstall PixInsight and reinstall everything, but I would also check that everything was removed before reinstallation.

One final thought: Do you have something like a virus scanner? Maybe, this can influence the update process of PixInsight depending on the configuration. I also have some of these question marks on some of my processes (on macOS), this seems to be more or less "normal". I'm running on macOS, so I have only limited experience with today's Windows issues.

Regards,
Jürgen
 
This sounds not so good! Something strange is going on your system! The scripts don't interact directly with any Win32 component, they just call processes from PixInsight and are executed inside the JavaScript engine. First of all, I would restart my computer in this case. As a second step I would clean all PixInsight cache folders and would run an "Reset Updates", followed by restarting PixInsight.

If the same issue still occurs, you should check if all processes are still working and if you can run other scripts (to check if the JavaScript Engine is still working). Normally, the scripts should appear after the update automatically - it is always a bad sign, if this does not happen (in this case something went wrong, so PixInsight was unable to add them to the script menu).
If nothing else helps: my final recommendation would be to uninstall PixInsight and reinstall everything, but I would also check that everything was removed before reinstallation.

One final thought: Do you have something like a virus scanner? Maybe, this can influence the update process of PixInsight depending on the configuration. I also have some of these question marks on some of my processes (on macOS), this seems to be more or less "normal". I'm running on macOS, so I have only limited experience with today's Windows issues.

Regards,
Jürgen
Yeah, something is jacked up the program as a whole now. Everything was fine before, but now, all scripts do not work. Everything throws that error.

I have restarted my computer multiple times now and did the "Reset Update" to no avail. I removed the Toolbox from the Repo list and from the "Feature Scripts", restarted but nada. I then updated my GPU driver to latest studio version, reverted the Tensor dll to CPU, then back to GPU and did a reset of the updates, and still nothing.

When trying to open an image, Pix seems to open and close literally 50-100 times in the matter of 2 seconds. It does open the image, but trying to apply an STF shows the same error.

I deleted all the cache and swap files, reset update, and restarted Pix but it is still not working.

Not sure why this script suddenly caused this issue and I am not sure what the "?" at the start of them in the process console means.

1713631548297.png



EDIT: Reinstalling Pix and removing all scripts seemed to revive it.

Later EDIT: After doing all the scripts, it seems that I got everything working. I have no idea what caused the error.
 
Last edited:
On the question marks ... PI introduced a code signing facility for processes (code signing for scripts has been in for some time). If a process is not signed you will get the question mark. I will be signing my existing processes (eg Colourise, GHS, NBN) in due course but so far have only signed the new ColourMask process.
CS, Mike
 
Hi

I am a newbie in processing .. i have Install Toolbox and when i try to exécute CreateHubblePaletteFromOSC il doesn't works and this is the message error :

Processing script file: /Applications/PixInsight/src/scripts/Toolbox/CreateHubblePaletteFromOSC.js

*** Error: Signature verification failed for 'CreateHubblePaletteFromOSC': Invalid code signature: /Applications/PixInsight/src/scripts/Toolbox/CreateHubblePaletteFromOSC.js

I have already uninstall Toolbox and réinstall it but in vain.

It is the same with the process ContinuumSubstraction and GraXpert ; the others process works well.


My Pixinsight version is 1.8.9-2 and my computer a Mac book pro running with macOS Monterey 12.7.4

Please what can I do ?`
 
Either you haven't updated to the latest version of the Toolbox which everything is signed, or you use an outdated version of Pixinsight.
The latest version is 1.8.9-2 Build 1605.

Cheers
Tom
 
For the record, should anyone come across this thread via a Google Search, my issue is actually not resolved. While everything was working during my previous test, subsequent ones reveal the same issue.

Though I never had issues before installing the Toolbox script, but cannot tell if this issue is related to it or not. Every time on startup, Pix is installing 62 modules and takes around 60-120 seconds to actually get up and running. Once it is up, it does not behave correctly and nothing works (open images, auto STF, even changing preferences).

I am not intending to derail this topic, but I can't make heads or tails of what the root issue is. Curiously, I have found that restarting Pix results in significantly faster startup and everything seems to work fine. That seems to indicate that something is going wrong during the first start up for a given PC wake session, but have zero idea what that could be.
 
Back
Top