Colmic (talk | contribs)
Marked this version for translation
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages />
<languages />
<translate>
<translate>
=Siril scripts=  
<!--T:21-->
<br />
<span style="color: #ff0090; font-weight: bold; text-align: center; margin: 2em; font-size: 125%;">This page is now deprecated. Please refer to the new documentation at [https://siril.readthedocs.io/en/stable/Scripts.html siril.readthedocs.io].</span>
<!--T:2-->
 
Since its early days, Siril can take user inputs as textual [[Siril:Commands|commands]], from the command line. Recently, [[Siril:Commands#Commands_history|more commands have been added]], enabling for a basic automated processing of images. Commands can be stored in a file that we call '''script''', and they are executed one after the other. Some commands can be used in scripts, some cannot, this is indicated in the help of the command line from the graphical user interface of siril.
<!--T:19-->
__FORCETOC__
 
=Siril scripts= <!--T:2-->
 
<!--T:20-->
Since its early days, Siril can take user inputs as textual [[Siril:Commands|commands]], from the command line. Recently, [[Siril:Commands#Commands_history|more commands have been added]], enabling for a basic automated processing of images. Commands can be stored in a file that we call '''script''', and they are executed one after the other. Some commands can be used in scripts, some cannot, this is indicated in the help of the command line from the graphical user interface of Siril.


<!--T:3-->
<!--T:3-->
Since release [[Siril:0.9.9|0.9.9]], Siril can execute scripts from a file. Since [[Siril:0.9.10|0.9.10]], [[Siril:Commands|commands]] can also be taken from a [[Siril:Commands#Command_stream_.28pipe.29|named pipe]].
Since release [[Siril:0.9.9|0.9.9]], Siril can execute scripts from a file. Since [[Siril:0.9.10|0.9.10]], [[Siril:Commands|commands]] can also be taken from a [[Siril:Commands#Command_stream_.28pipe.29|named pipe]] and more recently from the standard input too.


==Using scripts==
<br />
<!--T:5-->
<!--T:5-->
There are two ways to start a script manually: <br />
==Using scripts==
- using the '''@''' keyword on the command line, followed by the script name, as explained [[Siril:Commands#Introduction|here]],<br />
There are three ways to run a script:
- or use the script menu.
* from the graphical user interface, using the '''@''' keyword on the command line, followed by the script name in the current working directory, as explained [[Siril:Commands#Introduction|here]],
* from the graphical user interface, using the Scripts menu,
* from the command line interface (<tt>siril-cli</tt> executable), using argument <tt>-s</tt> followed by the script's path (see the [https://siril.org/docs/man/ man page] for more info).


<!--T:6-->
<!--T:6-->
The script menu only appears if some scripts have been found in the script search directories defined either by default or by the user in the program settings.
The scripts menu only appears if some scripts have been found in the script search directories defined either by default or by the user in the preference menu.


<!--T:11-->
<!--T:11-->
[[File:Scripts_EN.jpg]]
[[File:Scripts_EN.jpg]]


==Getting scripts==
<!--T:13-->
<br />
'''If you don't see the Scripts menu (or if you don't see the default scripts in the list):'''
 
<!--T:14-->
Please use the following procedure:
* click on the 'Burger' icon then on 'Preferences'
[[File:Menu-Preferences_EN.jpg]]
* click on the 'Scripts' section
* delete the 2 lines in the field as described below
* click on 'Apply'
* close and restart Siril
[[File:Preferences-Scripts_EN.jpg]]
 
<!--T:8-->
<!--T:8-->
In release [[Siril:0.9.10|0.9.10]], scripts will be provided with the installation. It was already the case only for the Windows installer for [[Siril:0.9.9|0.9.9]].
==Getting scripts==
* Since release [[Siril:0.9.10|0.9.10]], scripts are provided with the installation.
* Since release [[Siril:0.99.4|0.99.4]], a new command 'convert' allows the execution of universal scripts that are available for DSLR (RAW files) and astronomy cameras (FITS files).


Here are the scripts that are in the installers:
 
<!--T:15-->
'''Default scripts (automatically installed with Siril):'''


<!--T:9-->
<!--T:9-->
* [https://gitlab.com/free-astro/siril/raw/master/scripts/DSLR_preprocessing.ssf DSLR_preprocessing.ssf]: script for DSLR color camera preprocessing, uses bias, flats and darks, registers and stack the images.
* [https://gitlab.com/free-astro/siril/-/blob/master/scripts/Mono_Preprocessing.ssf Mono_Preprocessing.ssf]: script for monochrome DSLR or Astro camera preprocessing, uses biases, flats and darks, registers and stacks the images. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a monochrome file named result.fit.
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_Preprocessing_Drizzle.ssf DSLR_Preprocessing_Drizzle.ssf]: same with drizzle 2x
* [https://gitlab.com/free-astro/siril/-/blob/master/scripts/OSC_Preprocessing.ssf OSC_Preprocessing.ssf]: same script as above but for One-Shot Color (OSC) DSLR or Astro camera. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a RGB file named result.fit.
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_preprocessing_Cosmetic.ssf DSLR_preprocessing_Cosmetic.ssf]: same with cosmetic correction
* [https://gitlab.com/free-astro/siril/-/blob/master/3rdparty/scripts/en/OSC_Preprocessing_WithDrizzle.ssf OSC_Preprocessing_WithDrizzle.ssf]: same script as above with resize of images by 2x2. Beware, this script takes much more time and disk space. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a RGB file named result.fit.
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_preprocessing_Drizzle_Cosmetic.ssf DSLR_preprocessing_Drizzle_Cosmetic.ssf]: same with drizzle 2x and cosmetic correction
* [https://gitlab.com/free-astro/siril/-/blob/master/scripts/OSC_Extract_Ha.ssf OSC_Extract_Ha.ssf]: script for OSC DSLR or astro camera preprocessing, for use with Ha filter or dual-band filter. This script extracts the Ha layer of the color image. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a monochrome file named Ha_result.fit.
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_Preprocessing_NoDark.ssf DSLR_Preprocessing_NoDark.ssf]: use this script if you don't have darks
* [https://gitlab.com/free-astro/siril/-/blob/master/scripts/OSC_Extract_HaOIII.ssf OSC_Extract_HaOIII.ssf]: same script as above, but extracts Ha and OIII layers of the color image. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get 2 monochrome files named Ha_result.fit and OIII_result.fit. You can also use the menu 'Image Processing' then 'RGB compositing' and put Ha_result in Red layer and OIII_result in Green and Blue layers to get an HOO image.
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_Preprocessing_NoFlat.ssf DSLR_Preprocessing_NoFlat.ssf]: use this script if you don't have flats
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_Preprocessing_NoFlat_NoDark.ssf DSLR_Preprocessing_NoFlat_NoDark.ssf]: use this script if you don't have darks nor flats
* [https://gitlab.com/free-astro/siril/raw/master/3rdparty/scripts/en/DSLR_Preprocessing_NoFlat_NoDark_NoBias.ssf DSLR_Preprocessing_NoFlat_NoDark_NoBias.ssf]: use this script if you don't have darks, flats nor biases


<!--T:12-->
<br />


<!--T:16-->
'''Other scripts:'''
'''Other scripts:'''
* [[:File:DSLR_preprocessing_opt.ssf|DSLR_preprocessing_opt.ssf]]. Preprocess images with dark optimization: added 01/24/2019.  
 
* [[:File:DSLR_startrail.ssf|DSLR_startrail.ssf]]. Preprocess images and build a star-trail: added 02/12/2019.  
<!--T:18-->
* [[:File:DSLR_preprocessing_opt_diff_biases.ssf|DSLR_preprocessing_opt_diff_biases.ssf]]. Preprocess images with biases at same ISO of darks and other biases with same ISO of flats (generally the lowest): added 03/02/2019.
* [https://free-astro.org/images/4/4b/Mono_Preprocessing_WithoutFlat.ssf Mono_Preprocessing_WithoutFlat.ssf]: preprocess monochrome images without bias nor flat. Added 2020/10/17
* [https://free-astro.org/images/7/71/Mono_Preprocessing_WithoutDark.ssf Mono_Preprocessing_WithoutDark.ssf]: preprocess monochrome images without dark. Added 2020/10/17
* [https://free-astro.org/images/9/95/Mono_Preprocessing_WithoutDBF.ssf Mono_Preprocessing_WithoutDBF.ssf]: preprocess monochrome images without dark, bias nor flat. Added 2020/09/01
* [https://free-astro.org/images/f/f2/Mono_Preprocessing_withbackgroundextraction.ssf Mono_Preprocessing_withbackgroundextraction.ssf]: preprocess monochrome images with background extraction on each image. Added 2021/07/18.
* [https://free-astro.org/images/e/ea/OSC_Preprocessing_WithoutFlat.ssf OSC_Preprocessing_WithoutFlat.ssf]: preprocess color images without bias nor flat. Added 2020/10/17
* [https://free-astro.org/images/1/1a/OSC_Preprocessing_WithoutDark.ssf OSC_Preprocessing_WithoutDark.ssf]: preprocess color images without dark. Added 2020/10/17
* [https://free-astro.org/images/a/a4/OSC_Preprocessing_WithoutDBF.ssf OSC_Preprocessing_WithoutDBF.ssf]: preprocess color images without dark, bias nor flat. Added 2020/09/01
* [https://free-astro.org/images/d/dd/OSC_Startrail.ssf OSC_Startrail.ssf]: preprocess color images and build a star-trail. Added 2020/09/01.  
* [https://free-astro.org/images/0/06/OSC_Preprocessing_withbackgroundextraction.ssf OSC_Preprocessing_withbackgroundextraction.ssf]: preprocess color images with background extraction on each image. Added 2021/07/18.  




Line 51: Line 76:
We encourage users creating their own scripts to publish them and make a link in this page with a basic description of what they do.
We encourage users creating their own scripts to publish them and make a link in this page with a basic description of what they do.


We also suggest users with '''monochrome or CCD images''' and several filters to use [https://gitlab.com/free-astro/sirilic Sirilic] to generate scripts or [https://gitlab.com/free-astro/sirilic Sirilot] to provide a more suited way to manage all the files required for such a processing.
<!--T:17-->
We also suggest users to use [https://gitlab.com/free-astro/sirilic Sirilic] to generate scripts or to provide a more suited way to manage all the files for multi-session processing.


</translate>
</translate>

Latest revision as of 22:49, 16 September 2023

This page is now deprecated. Please refer to the new documentation at siril.readthedocs.io.


Siril scripts

Since its early days, Siril can take user inputs as textual commands, from the command line. Recently, more commands have been added, enabling for a basic automated processing of images. Commands can be stored in a file that we call script, and they are executed one after the other. Some commands can be used in scripts, some cannot, this is indicated in the help of the command line from the graphical user interface of Siril.

Since release 0.9.9, Siril can execute scripts from a file. Since 0.9.10, commands can also be taken from a named pipe and more recently from the standard input too.

Using scripts

There are three ways to run a script:

  • from the graphical user interface, using the @ keyword on the command line, followed by the script name in the current working directory, as explained here,
  • from the graphical user interface, using the Scripts menu,
  • from the command line interface (siril-cli executable), using argument -s followed by the script's path (see the man page for more info).

The scripts menu only appears if some scripts have been found in the script search directories defined either by default or by the user in the preference menu.

If you don't see the Scripts menu (or if you don't see the default scripts in the list):

Please use the following procedure:

  • click on the 'Burger' icon then on 'Preferences'

  • click on the 'Scripts' section
  • delete the 2 lines in the field as described below
  • click on 'Apply'
  • close and restart Siril

Getting scripts

  • Since release 0.9.10, scripts are provided with the installation.
  • Since release 0.99.4, a new command 'convert' allows the execution of universal scripts that are available for DSLR (RAW files) and astronomy cameras (FITS files).


Default scripts (automatically installed with Siril):

  • Mono_Preprocessing.ssf: script for monochrome DSLR or Astro camera preprocessing, uses biases, flats and darks, registers and stacks the images. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a monochrome file named result.fit.
  • OSC_Preprocessing.ssf: same script as above but for One-Shot Color (OSC) DSLR or Astro camera. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a RGB file named result.fit.
  • OSC_Preprocessing_WithDrizzle.ssf: same script as above with resize of images by 2x2. Beware, this script takes much more time and disk space. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a RGB file named result.fit.
  • OSC_Extract_Ha.ssf: script for OSC DSLR or astro camera preprocessing, for use with Ha filter or dual-band filter. This script extracts the Ha layer of the color image. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get a monochrome file named Ha_result.fit.
  • OSC_Extract_HaOIII.ssf: same script as above, but extracts Ha and OIII layers of the color image. To use it: put your files (RAW or FITs) in the folders named 'lights', 'darks', 'flats' and 'biases' (in the SiriL default working folder), then run the script. When the script ends, you get 2 monochrome files named Ha_result.fit and OIII_result.fit. You can also use the menu 'Image Processing' then 'RGB compositing' and put Ha_result in Red layer and OIII_result in Green and Blue layers to get an HOO image.


Other scripts:


We encourage users creating their own scripts to publish them and make a link in this page with a basic description of what they do.

We also suggest users to use Sirilic to generate scripts or to provide a more suited way to manage all the files for multi-session processing.