Gradient removal can be sometimes a challenging and time-consuming task. GraXpert AI tries to make this task more easy. The underlying AI model is realized as a neural network which has been trained using images provided by the community and will become better over time with more training data.
You can download this script separately from the toolbox and can use Feature Scripts to install it. You can find all sources on gitlab: https://gitlab.com/pixinsight-scripts/toolbox
This script requires the GraXpert application to be installed on your machine.
Download it from https://www.graxpert.com
You should run it first and try it out to ensure everything is working fine. GraXpert will load the latest AI model automatically when you are using it to remove the background using the AI method and stores it on your machine, so it will not be downloaded again when you are using the script to process images.
If everything works as expected you can now start PixInsight and use this script to remove the background directly from within PixInsight. The script needs to start GraXpert and for this reason the path to GraXpert is needed.
Please click on the little wrench icon to setup the path to GraXpert. This path information will be stored in a text file in your home directory, so will not need to repeat this when using the script the next time.
How does the script work?
Does GraXpert not meet your expectations?
The script will save your selected image to your temp folder on your machine, then it will call GraXpert and adds your image and your settings as parameters. GraXpert will now always use the AI mode and always uses the latest AI model to calculate the background model of your image. If you changed the Smoothing Factor, GraXpert will add a gaussian blur to this background model. Finally, it will subtract the background from your image and saves it as a new image back into the temp folder.
If you also selected „Show background model“ GraXpert will also save the calculated background image to the temp folder. GraXpert also normalizes the resulting image to achieve best results. For this reason the GraXpert generated background image is required to be stored in order to show it in PixInsight, because the resulting image is not just the original image subtracted by the background model.
The script recognizes when GraXpert finished its job and will now load the processed image. Your image content will be replaced with the content of the processed image unless you uncheck „Replace the target view“. Otherwise your original image will be cloned by the script and the cloned image content will be replaced. Only the pixel content will be replaced, so any Metadata in the FITS/XSIF header will be still available, including the astrometric solution.
If you also checked „Show background model“ the script will also load the background model image from the temp folder. Finally, the script will apply a new ScreenTransferFunction unlinked stretch to your image, so you can immediately see the result. Gradient removal should always be the first processing step (after cropping the image, if not done in WBPP), so the image is not color calibrated and for this reason an unlinked stretch should be what you want. In case you prefer a linked stretch for any reason, you can still do this using the ScreenTransferFunction process in PixInsight.
The GraXpert AI model was trained using a lot of images from our dark matters discord community. But an AI model is only as good as it was trained. If you dislike the result you can either blame us or help us, but blaming will not help you! Please consider providing us your image for training purposes!
Please follow these instructions and fill out this form:
Finally, please upload your data together with the above document here:
For the best user experience you should keep GraXpert up-to-date. Please install the latest version for your operating system from https://www.graxpert.com. After installation you should run GraXpert at least once to avoid any problems. Sometimes new requested features require both a new script version and a new Graxpert version in order to work. So please ensure you are running the latest versions for both the script and GraXpert!
GraXpert will automatically update the AI model for you, when a new AI model is available. This way you will always benefit from the latest improvements!
Frequently asked questions