How to use master calibration frames in scripts?

I’m trying to use master bias in my scripts but I’m unsure how to actually do this. I have a script like this:

OSC_Preprocessing_WithoutDark_WithMasterBias.ssf (1.2 KB)

The master bias file is named bias-iso-1600_stacked.fit and I’ve selected it to be the master bias in preferences:

But when I run the script, it produces an error:

23:14:52: Saving FITS: file ../process/flat_00028.fit, 1 layer(s), 6024x4024 pixels 23:14:52: Saving FITS: file ../process/flat_00030.fit, 1 layer(s), 6024x4024 pixels 23:14:52: Conversion succeeded, 30 file(s) created for 30 input file(s) (30 image(s) converted, 0 failed) 23:14:52: Running command: cd 23:14:52: Setting CWD (Current Working Directory) to '/Users/dale/Desktop/astrophotography-wip/2022-01-08-pleiades-guided-210mm/process' 23:14:52: # Pre-process Flat Frames 23:14:52: Running command: preprocess 23:14:52: bias-iso-1600_stacked.[any_allowed_extension] not found. 23:14:52: Error in line 37: 'preprocess'. 23:14:52: Exiting batch processing. 23:14:52: Setting CWD (Current Working Directory) to '/Users/dale/Desktop/astrophotography-wip/2022-01-08-pleiades-guided-210mm' 23:14:52: Script execution failed.

Do I need to write out the whole path to my master bias file for this to work? I was hoping to be able to just select the master bias file in preferences and then in my script, somehow tell it to use the master bias. This way, I don’t need to ever change the script, just update the master calibration frames in the preferences.

Hello and welcome!
The window you are showing is the preferences, setting master files here will only populate the same boxes in the pre-processing tab of the main window for manual processing. This is useful if somebody always uses the same master files, to avoid choosing it every time a sequence is processed.

When using scripts, the master files are created, referenced and used by the script itself without using what is in the pre-processing tab.

Here you are using a script that does not compute a master bias but you want to use one you already created, that’s fine but indeed, the path is important. The working directory at the preprocess line would be /Users/dale/Desktop/astrophotography-wip/2022-01-08-pleiades-guided-210mm/process, so you should either set an absolute path for the master bias or a path relative to this directory, maybe ../../bias-iso-1600_stacked.

I misunderstood how that setting worked, thanks Vincent.

I think it would be super convenient to have an option to specify the master calibration frames and for the scripts to be able to refer to them in some way so you don’t have to change the scripts. For now, I’ll make the script to refer to a real file like some-directory/master-bias.fit and I’ll just update the file with whichever master calibration file I want to use.

You can also specify a synthetic bias instead and no more problems: Siril - Synthetic biases

Thanks for the link. So it seems the main advantage of the synthetic bias is that noise is not introduced?

that and the fact that you reduce the number of images to acquire, store and process.

Hi unpacklo, I read that script & Siril will be in the process folder when trying to find the master bias in the same folder. Rather than modifying the script for each project I would just copy the correct master bias into the process folder before running the script. If you use unique master biases for projects with different iso’s I would just rename it to something like m_bias.fit each time you copy it & change the script once, in both places, to call on that file name.
I have personally become a fan of synthetic biases, I only ever use 1 gain & offset value so it’s pretty simple to script it. If you use various ISOs & if your cam varies offset you will need to determine the matching bias median value to subtract & modify the script for each run because I don’t think a dslr produces a fits header nor an offset value to put in it.
Hope this helps in some way!