User Tools

Site Tools


Sidebar

Home

Documentation

Tutorial

Reference Manual

Installation

en:documentation:image_preprocessing

Image preprocessing

It is possible to use scripts to preprocess the new images automatically for example at the end of the nightly sequence.
There is standard script you can use directly or if you have very specific needs you can modify them to make your own. This page describe this standard scripts in more detail.

Using Siril

Siril is a powerful image processing software that can be automated with it's own scripting language. You need at least the version 0.9.9 to use this scripts.
Just install the latest version for your system, no specific configuration in Siril is need.

You can select the following from any CCDciel script selection box:

  • siril_bias : Process the bias files and produce the master bias.
  • siril_dark : Process the dark files and produce the master dark.
  • siril_flat : Process the flat files and produce the master flat, one per filter if it apply.
  • siril_light : Preprocess all the light frame using the master dark and flat.
  • siril_light_color : Preprocess all the color light frame using the master dark and flat.

You need to follow a standard scheme for the file and folder name, otherwise the script will not work.
In the file preferences you must set the following:

  • Separator must be _
  • FITS file extension must be .fits
  • For File name option you must check only “Object name” and if using a filter wheel also set “Filter”. It is very important that “Date(UT)/Sequence” and any other option remain unchecked.
  • For Folder name options you must check only “Subfolder by frame type”. It is very important that any other option remain unchecked.

After you run the script you can look at the log file created in the CCDciel Capture folder. This file show all the Siril operations and messages.


Usage requirement

As it is not possible to make standard script that adapt to every use case you must be careful of the following condition before to use them:

  • Follow the file and folder naming convention.
  • All the light frames must be taken on the same condition with respect to the temperature, gain and exposure time.
  • The dark must correspond to the light exposure condition.
  • The master flat is mandatory. If you not want to use a flat, create a fits file filled with a uniform value.

Take and process Bias

The following descriptions will use a sequence as an example, but you can do the same by using directly the Capture and the Script tools.

First create a plan to take the bias frames:

Then create a sequence to run this plan and preprocess the bias:

After you run this sequence you find in the Bias directory every individual bias frame and the processed master bias:

With a cooled camera you probably not make bias every day, so just keep the file Master_Bias.fits in place so it can be used by the other processing operation.


Take and process Dark

Same as for the bias, create a plan to take the dark frames:

Then create a sequence to run this plan and preprocess the dark:

After you run this sequence you find in the Dark directory every individual dark frame and the processed master dark:

With a cooled camera you probably not make dark every day, so just keep the file Master_Dark.fits in place so it can be used by the other processing operation.


Take and process Flat

It is required the Master_Bias is available before you can run this script.
We have more options to make the flat frames because it depend if we use a flat panel or sky flat, and if we use a filter wheel or not.
To use a flat panel just create a plan as for the dark but select “Flat” for the type.

Then create a sequence to run this plan and preprocess the flat.
To use a sky flat add an automatic dusk or dawn Sky Flat in the sequence.

After you run this sequence you find in the Flat directory every individual flat frame and the processed master flat:

As you probably make flat every day a good place to add this processing is at the end of the sequence, just before to process the light frames. Or you can use a specific flat sequence you run at the beginning of the night.


Take and process Light

It is required the Master_Dark and Master_Flat are available before you can run this script.
Again it depend how you take the flat to chain this process. The important point is it run once at the end of the night after the flat are processed.

If you use a flat panel a good solution is to use the Script option in the sequence termination options. This ensure it run only once if you set a sequence repetition or if the sequence is interrupted at dawn.

If you use a sky flat you can add the script at the end of the sequence after the flat processing:

After the script is finished you find the dark and flat preprocessed files for all the objects and all the filters in a new directory “processed” under the base capture directory. Every file is prefixed by “pp_” as Siril do to distinguish them from the original files.

By default this script stop here because at this point you probably want to review your files and make some selection before to go further.

But if you want it is possible to continue with alignment and stacking. For that you need to modify the file template_light.ssf located in the CCDciel program directory in scripts/siril.
On Windows this is “Program Files\ccdciel\scripts\siril”, on Linux this is “/usr/share/ccdciel/scripts/siril”
In the file remove the # in front of the command “register” and “stack”. If you use a OSC or DSLR camera you also need to add the options “-cfa -debayer” to the preprocess command to debayer the images before the registration.


en/documentation/image_preprocessing.txt · Last modified: 2022/11/24 14:52 by pch