(new outline)
m (split_cfa)
 
(51 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
=Introduction=
 
=Introduction=
  
Commands can be typed in the command line at the bottom of Siril's main window. The <SPACE> character is the delimiter between arguments. If you need to have spaces inside the arguments, you can use the quote or double quote, just like in a shell.
+
[[Siril]] has a command line in its graphical user interface and an ability to run scripts that are a list of commands. Most commands have an effect on the loaded image or sequence and allow them to be processed in some way without user intervention. With [[Siril:0.9.9|0.9.9]], we introduced commands that helped automating the processing of a sequence, like [[#register|register]] and [[#stack|stack]]. They  work on sequences that are not loaded.
  
Another way is to put commands in a file, if you use them regularly, and execute the file, which becomes some kind of script. To execute the file, use the '''@''' token of the command line like so:
+
The <SPACE> character is the delimiter between arguments. If you need to have spaces inside the arguments, you can use the quote or double quote, just like in a shell.
 +
 
 +
Commands can be typed in the command line at the bottom of Siril's main window.
 +
Another way is to put commands in a file and execute it as a script. To execute the file, use the '''@''' token of the command line like so:
 
  @file_name
 
  @file_name
  
Most commands have an effect on the loaded image or sequence. However, with [[0.9.9]], we are introducing new commands that will help automate the processing of a sequence, like [[#register|register]] and [[#stack|stack]], that work on sequences that are not loaded.
+
=Command stream (pipe)=
 +
Starting with [[Siril:0.9.10|0.9.10]], a new mode has been introduced in which commands can be sent through a named pipe and logs and status can be obtained through another. The mode is activated using the <code>-p</code> command line argument.
 +
 
 +
The protocol is quite simple: Siril receives commands and outputs some updates. Only commands that are marked as scriptable can be used with this system. Whenever the command inputs pipe is closed or the <code>cancel</code> command is given, the running command is stopped as if the stop button was clicked on in the GUI. The pipes are named <code>siril_command.in</code> and <code>siril_command.out</code> and are available in /tmp on Unix-based systems.
 +
 
 +
Outputs of siril on the pipe is a stream of one line text and formatted as follows:
 +
* <code>log: </code>followed by a log message
 +
* <code>status: verb [subject]</code>, where verb can be either of <code>starting</code>, <code>success</code>, <code>error</code> or <code>exit</code> (exit message is not yet implemented). The subject is the current command name, except for exit that indicates that siril suffered a fatal error and has to exit.
 +
* <code>progress: value%</code> is the equivalent of the progress bar, it sends percents periodically, and sometimes 0% at the end of a processing as an ''idle'' information.
  
 
=Commands history=
 
=Commands history=
Line 14: Line 25:
 
These lists help you see what has changed in the last version, whether new or modified commands.
 
These lists help you see what has changed in the last version, whether new or modified commands.
  
* [[Siril:0.9.9|0.9.9]]: [[#register|register]], [[#stack|stack]], @
+
* 0.9.12: [[#split_cfa|split_cfa]]
 +
* 0.9.11: [[#stack|stack]], [[#stackall|stackall]], [[#setmem|setmem]]
 +
* 0.9.10: [[#setfindstar|setfindstar]], [[#grey_flat|grey_flat]], [[#asinh|asinh]], [[#rgradient|rgradient]]
 +
* [[Siril:0.9.9|0.9.9]]: [[#convertraw|convertraw]], [[#preprocess|preprocess]], [[#register|register]], [[#stack|stack]], [[#close|close]], [[#clear|clear]], [[#setext|setext]], @
 
* [[Siril:0.9.8|0.9.8]]: [[#savepng|savepng]], [[#stackall|stackall]]
 
* [[Siril:0.9.8|0.9.8]]: [[#savepng|savepng]], [[#stackall|stackall]]
  
Line 24: Line 38:
 
  addmax filename
 
  addmax filename
 
addmax compute a new image IMG with IMG_1 and IMG_2. The pixel of IMG_1 is replaced by the pixel at the same coordinates of IMG_2 if the intensity of 2 is greater than 1. Do not forget to save the result.
 
addmax compute a new image IMG with IMG_1 and IMG_2. The pixel of IMG_1 is replaced by the pixel at the same coordinates of IMG_2 if the intensity of 2 is greater than 1. Do not forget to save the result.
 +
 +
==asinh==
 +
asinh stretch
 +
asinh command stretches the image for show faint objects, while simultaneously, preserve the structure of bright objects of the field.
  
 
==bg==
 
==bg==
Line 42: Line 60:
 
  cdg
 
  cdg
 
Return the coordinates of the center of gravity of the image.
 
Return the coordinates of the center of gravity of the image.
 +
 +
==clear==
 +
clear
 +
Clears the graphical output logs
  
 
==clearstar==
 
==clearstar==
 
  clearstar
 
  clearstar
 
Clear all the stars saved in memory and displayed on the screen.
 
Clear all the stars saved in memory and displayed on the screen.
 +
 +
==close==
 +
close
 +
Properly closes the opened image and the opened sequence, if any.
  
 
==cosme==
 
==cosme==
Line 56: Line 82:
 
==cosme_cfa==
 
==cosme_cfa==
 
  cosme_cfa filename
 
  cosme_cfa filename
Same function that COSME but applying to RAW CFA images.
+
Same function that [[#cosme|COSME]] but applying to RAW CFA images.
 +
 
 +
==convertraw==
 +
convertraw basename [-debayer]
 +
Convert DSLR RAW files into Siril's FITS images. The basename argument is the base name of the new sequence. The debayer option applies demosaicing to the pre-processed images, avoiding this extra step for processing.
  
 
==crop==
 
==crop==
  crop x, y, width, height
+
  crop [x, y, width, height]
Crops the current image within the rectangle previously selected.
+
It can be used with the GUI: if a selection has been made with the mouse, calling the crop command without arguments crops it on this selection. Otherwise, or in scripts, arguments have to be given, with x and y being the coordinates of the top left corner, and width and height the size of the selection.
  
 
==ddp==
 
==ddp==
Line 97: Line 127:
 
==fill2==
 
==fill2==
 
  fill2 value x y width height
 
  fill2 value x y width height
Same command than fill but this is a symmetric fill of a region defined by the mouse. Used to process an image in the Fourier (FFT) domain.
+
Same command than [[#fill|FILL]] but this is a symmetric fill of a region defined by the mouse. Used to process an image in the Fourier (FFT) domain.
 +
 
 +
==find_cosme==
 +
find_cosme cold_sigma hot_sigma
 +
This command applies an automatic detection of cold and hot pixels following the threshold written in arguments.
 +
 
 +
==find_cosme_cfa==
 +
find_cosme_cfa cold_sigma hot_sigma
 +
Same command than [[#find_cosme|FIND_COSME]] but for monochromatic CFA images.
  
 
==find_hot==
 
==find_hot==
 
  find_hot filename cold_sigma hot_sigma
 
  find_hot filename cold_sigma hot_sigma
The command provides a file lists "filename" (format text) in the working directory which contains the coordinates of the pixels which have an intensity "hot_sigma" times higher and "cold_sigma" lower than standard deviation. We generally use this command on a master-dark file.
+
The command provides a list file "filename" (format text) in the working directory which contains the coordinates of the pixels which have an intensity "hot_sigma" times higher and "cold_sigma" lower than standard deviation. We generally use this command on a master-dark file.
  
 
==findstar==
 
==findstar==
 
  findstar
 
  findstar
Detects stars having a level greater than a threeshold computed by Siril. The algorithm is based on the publication of Mighell, K. J. 1999, in ASP Conf. Ser., Vol. 172, Astronomical Data Analysis Software and Systems VIII, eds. D. M. Mehringer, R. L. Plante, & D. A. Roberts (San Francisco: ASP), 317.
+
Detects stars having a level greater than a threshold computed by Siril. The algorithm is based on the publication of Mighell, K. J. 1999, in ASP Conf. Ser., Vol. 172, Astronomical Data Analysis Software and Systems VIII, eds. D. M. Mehringer, R. L. Plante, & D. A. Roberts (San Francisco: ASP), 317.
  
After that, a dynamic PSF is applied and Siril rejects all detected structures that don't fulfill a set of prescribed detection criteria. Finaly, a circle is drawn around detected stars. See also the command [[#clearstar|clearstar]].
+
After that, a PSF is applied and Siril rejects all detected structures that don't fulfill a set of prescribed detection criteria. Finaly, a circle is drawn around detected stars. See also the command [[#clearstar|CLEARSTAR]].
  
 
==fmedian==
 
==fmedian==
Line 114: Line 152:
 
The output pixel is computed as :
 
The output pixel is computed as :
 
out <math>=</math>mod <math> \times\ m + (1-</math>mod<math>) \times </math>in, where m is the median-filtered pixel value. A modulation's value of 1 will apply no modulation.
 
out <math>=</math>mod <math> \times\ m + (1-</math>mod<math>) \times </math>in, where m is the median-filtered pixel value. A modulation's value of 1 will apply no modulation.
 +
 +
==fmul==
 +
fmul scalar
 +
Multiplies the loaded image by the scalar given in argument.
  
 
==fixbanding==
 
==fixbanding==
 
  fixbanding amount sigma
 
  fixbanding amount sigma
Try to remove the canon banding. "Amount" define the amouont of correction. Sigma defines a protection level of the algorithm, higher sigma gives higher protection.
+
Try to remove the canon banding. Argument "amount" define the amouont of correction. Sigma defines a protection level of the algorithm, higher sigma gives higher protection.
  
 
==gauss==
 
==gauss==
 
  gauss sigma
 
  gauss sigma
 
Performs a Gaussian filter with the given sigma.
 
Performs a Gaussian filter with the given sigma.
 +
 +
==grey_flat==
 +
grey_flat
 +
The function equalizes the mean intensity of RGB layers in a CFA images.
  
 
==help==
 
==help==
Line 153: Line 199:
 
  load filename
 
  load filename
 
  load filename.ext
 
  load filename.ext
Loads the fits image filename; it first attempts to load filename, then filename.fit and finally filename.fits and after, all supported format, aborting if none of these are found. These scheme is applicable to every Siril command implying reading files. Fits headers MIPS-HI and MIPS-LO are read and their values given to the current viewing levels.
+
Loads the image filename; it first attempts to load filename, then filename.fit and finally filename.fits and after, all supported format, aborting if none of these are found. These scheme is applicable to every Siril command implying reading files. Fits headers MIPS-HI and MIPS-LO are read and their values given to the current viewing levels. Writing a known extension at the end of filename will load the image filename.ext: this is used when numerous files have the same name but not the same extension.
 
 
Writing a known extension at the end of filename will load the image filename.ext: this is used when numerous files have the same name but not the same extension.
 
  
 
Extensions supported are :
 
Extensions supported are :
Line 169: Line 213:
 
==ls==
 
==ls==
 
  ls
 
  ls
This command lists files and diretories in the working directory.
+
Lists files and directories in the working directory.
  
 
==mirrorx==
 
==mirrorx==
Line 191: Line 235:
 
Adds the constant value to the current image. This constant can take a negative value. As Siril uses unsigned fit files, if the intensity of the pixel become negative its value is replaced by 0 and by 65535 (for a 16-bit file) if the pixel intensity overflows.
 
Adds the constant value to the current image. This constant can take a negative value. As Siril uses unsigned fit files, if the intensity of the pixel become negative its value is replaced by 0 and by 65535 (for a 16-bit file) if the pixel intensity overflows.
 
To check the minimum and maximum intensities values, click on the Auto level button and note the low and high threshold.
 
To check the minimum and maximum intensities values, click on the Auto level button and note the low and high threshold.
 +
 +
==preprocess==
 +
preprocess sequencename [-bias=filename] [-dark=filename] [-flat=filename] [-cfa] [-debayer] [-stretch] [-flip] [-equalize_cfa] [-opt]
 +
Preprocesses the sequence "sequencename" using bias, dark and flat given in argument. It is possible to specify if images are CFA for cosmetic correction purposes with the option "-cfa" and also to demosaic images at the end of the process with "-debayer". This option can be associated to "-stretch" in order to stretch to 16-bit the image during this operation (works only with images from DSLR). The "-flip" option tells to Siril to read image from up to bottom for demosaicing operation and the "-equalize_cfa" option equalizes the mean intensity of RGB layers of the CFA flat master. It is also possible to optimize the dark subtraction with "-opt".
 +
 +
Note that only hot pixels are corrected in cosmetic correction process
  
 
==psf==
 
==psf==
 
  psf
 
  psf
 +
Performs a PSF (Point Spread Function) on the selected star.
 +
 
Make a selection around a star and call the command PSF. It will give you:
 
Make a selection around a star and call the command PSF. It will give you:
 
* The centroid coordinates (x0 and y0) in pixel units, which is the position of the center of symmetry of the fitted PSF.
 
* The centroid coordinates (x0 and y0) in pixel units, which is the position of the center of symmetry of the fitted PSF.
Line 205: Line 257:
 
To be relevant, the selection MUST be done on a non-saturated star.
 
To be relevant, the selection MUST be done on a non-saturated star.
  
==seqpsf==
+
==register==
  seqpsf
+
  register sequence [-norot] [-drizzle]
Same command than [[#psf|psf]] but works for sequences. Results are dumped in the console in a form that can be used to produce brightness variation curves.
+
Performs geometric transforms on images of the sequence given in argument so that they may be superimposed on the reference image. The output sequence name starts with the prefix "r_". Using stars for registration, this algorithm only works with deepsky images. The option "-norot" performs a translation only with no new sequence built while the option "-drizzle" applies a x2 drizzle on the images
  
 
==resample==
 
==resample==
 
  resample factor
 
  resample factor
Resample image with a factor "factor"
+
Resamples image with a factor "factor".
 +
 
 +
==rgradient==
 +
rgradient xc yc dR dalpha
 +
Creates two images, with a radial shift ("dR" in pixels) and a rotational shift ("dalpha" in degrees) with respect to the point ("xc", "yc"). Between these two images, the shifts have the same amplitude, but an opposite sign. The two images are then added to create the final image. This process is also called Larson Sekanina filter.
 +
 
 +
==rl==
 +
rl iterations sigma
 +
Restores an image using the Richardson-Lucy method. Iterations is the number of iterations to be performed (typically between 10 and 50). Sigma is the size of the kernel to be applied.
  
 
==rmgreen==
 
==rmgreen==
Line 222: Line 282:
 
==rotate==
 
==rotate==
 
  rotate degree
 
  rotate degree
Rotates the image of an angle of degree value. This function requieres the installation of libopencv.
+
Rotates the image of an angle of degree value.
  
 
==rotatepi==
 
==rotatepi==
Line 230: Line 290:
 
==satu==
 
==satu==
 
  satu coeff
 
  satu coeff
Enhance the global saturation of the image. Try iteratively to obtain best results. For example:
+
Enhances the global saturation of the image. Try iteratively to obtain best results. For example:
 
satu 0.1
 
satu 0.1
  
 
==save==
 
==save==
 
  save filename
 
  save filename
Save current image to filename.fit. Fits headers MIPS-HI and MIPS-LO are added with values corresponding to the current viewing levels..
+
Saves current image to filename.fit. Fits headers MIPS-HI and MIPS-LO are added with values corresponding to the current viewing levels.
  
 
==savebmp==
 
==savebmp==
 
  savebmp filename
 
  savebmp filename
Save current image under the form of a bitmap file with 8bits per channel: filename.bmp (BMP 24 bits). This function is like a screenshot of what you see with the levels updated. This is very usefull to share an image in the bitmap format.
+
Saves current image under the form of a bitmap file with 8bits per channel: filename.bmp (BMP 24 bits).
  
 
==savejpg==
 
==savejpg==
 
  savejpg filename [quality]
 
  savejpg filename [quality]
Save current image into a JPG file. You have the possibility to adjust the quality of the compression. A value 100 for quality parameter offers best fidelity while a low value increases the compression ratio. If no value is specified, it holds a value of 100. This command is very usefull to share an image in the jpeg format on the forums for example.
+
Saves current image into a JPG file. You have the possibility to adjust the quality of the compression. A value 100 for quality parameter offers best fidelity while a low value increases the compression ratio. If no value is specified, it holds a value of 100. This command is very usefull to share an image in the jpeg format on the forums for example.
  
 
==savepng==
 
==savepng==
 
  savepng filename
 
  savepng filename
Save current image as a PNG file.
+
Saves current image as a PNG file.
  
 
==savepnm==
 
==savepnm==
 
  savepnm filename
 
  savepnm filename
Save current image under the form of a Netpbm file format with 16bits per channel. The extension of the output will be filename.ppm for RGB image and filename.pgm for gray-level image. More details about the Netpbm format at : [http://en.wikipedia.org/wiki/Netpbm_format http://en.wikipedia.org/wiki/Netpbm_format].
+
Saves current image under the form of a Netpbm file format with 16bits per channel. The extension of the output will be filename.ppm for RGB image and filename.pgm for gray-level image. More details about the Netpbm format at : [http://en.wikipedia.org/wiki/Netpbm_format http://en.wikipedia.org/wiki/Netpbm_format].
  
 
==savetif==
 
==savetif==
 
  savetif filename
 
  savetif filename
Save current image under the form of a uncompressed TIFF file with 16bits per channel.
+
Saves current image under the form of a uncompressed TIFF file with 16bits per channel.
  
 
==savetif8==
 
==savetif8==
 
  savetif8 filename
 
  savetif8 filename
Same command than savetif but the output file is saved in 8bits per channel.
+
Same command than [[#save_tif|SAVE_TIF]] but the output file is saved in 8bits per channel.
  
 
==select==
 
==select==
Line 270: Line 330:
  
 
The second number can be greater than the number of images to just go up to the end.
 
The second number can be greater than the number of images to just go up to the end.
 +
 +
See [[#unselect|UNSELECT]].
 +
 +
==seqcrop==
 +
seqcrop
 +
Crops the loaded sequence.
 +
 +
==seqfind_cosme==
 +
seqfind_cosme cold_sigma hot_sigma
 +
Same command than [[#find_cosme|FIND_COSME]] but for the loaded sequence.
 +
 +
==seqfind_cosme_cfa==
 +
seqfind_cosme_cfa cold_sigma hot_sigma
 +
Same command than [[#find_cosme_cfa|FIND_COSME_CFA]] but for the loaded sequence.
 +
 +
==seqpsf==
 +
seqpsf
 +
Same command than [[#psf|PSF]] but works for sequences. Results are dumped in the console in a form that can be used to produce brightness variation curves.
  
 
==setcpu==
 
==setcpu==
 
  setcpu number
 
  setcpu number
Defines the number of processing threads used for calculation. Can be as high as the number of virtual threads existing on the system, which is the number of CPU cores or twice this number if hyperthreading (Intel HT) is available.
+
Defines the number of processing threads used for calculation. Can be as high as the number of virtual threads existing on the system, which is the number of CPU cores or twice this number if hyper-threading ([https://en.wikipedia.org/wiki/Hyper-threading Intel HT]) is available. The default value is the maximum number of threads available, so this should mostly be used to limit processing power. See also [[#setmem|SETMEM]].
 +
 
 +
==setext==
 +
  setext extension
 +
Sets the extension used and recognized by sequences. The argument "extension" can be "fit", "fts" or "fits".
 +
 
 +
==setfindstar==
 +
setfindstar ksigma roundness
 +
Defines thresholds above the noise and star roundness for all subsequent stars detection with [[#findstar|FINDSTAR]] and [[#register|REGISTER]] commands of the session. Ksigma must be greater or equal to 0.05 and roundness between 0 and 0.9.
 +
 
 +
The threshold for star detection is computed as the median of the image (which represents in general the background level) plus ''Ksigma'' times sigma, sigma being the standard deviation of the image (which is a good indication of the noise amplitude). If you have many stars in your images and a good signal/noise ratio, it may be a good idea to increase this value to speed-up the detection and false positives.
 +
 
 +
The roundness argument is the minimal ratio of the short axis on the long axis of the star Gaussian fit (see [[Siril:PSF|PSF]]). A value of 1 would keep only perfectly round stars, a value of 0.5, the default, means that stars detected twice as big on an axis as on the other will still be used for registration.
 +
 
 +
It is recommended to '''test the values''' used for a sequence with Siril's GUI, available in the dynamic PSF toolbox from the analysis menu. It may improve registration quality to increase the parameters, but it is also important to be able to detect several tens of stars in each image.
  
 
==setmag==
 
==setmag==
 
  setmag magnitude
 
  setmag magnitude
Calibrates the magnitude by selecting a star and giving the known apparent magnitude. All PSF computations will return the calibrated apparent magnitude afterwards, instead of an apparent magnitude relative to ADU values. To reset the magnitude constant see [[#unsetmag|unsetmag]].
+
Calibrates the magnitude by selecting a star and giving the known apparent magnitude. All PSF computations will return the calibrated apparent magnitude afterwards, instead of an apparent magnitude relative to ADU values. To reset the magnitude constant see [[#unsetmag|UNSETMAG]].
  
 
==setmagseq==
 
==setmagseq==
 
  setmagseq magnitude
 
  setmagseq magnitude
 
This command is only valid after having run seqpsf or its graphical counterpart (select the area around a star and launch the psf analysis for the sequence, it will appear in the graphs). This command has the same goal as [[#setmag|setmag]] but recomputes the reference magnitude for each image of the sequence where the reference star has been found. When running the command, the last star that has been analysed will be considered as the reference star. Displaying the magnitude plot before typing the command makes it easy to understand. To reset the reference star and magnitude offset, see [[#unsetmagseq|unsetmagseq]].
 
This command is only valid after having run seqpsf or its graphical counterpart (select the area around a star and launch the psf analysis for the sequence, it will appear in the graphs). This command has the same goal as [[#setmag|setmag]] but recomputes the reference magnitude for each image of the sequence where the reference star has been found. When running the command, the last star that has been analysed will be considered as the reference star. Displaying the magnitude plot before typing the command makes it easy to understand. To reset the reference star and magnitude offset, see [[#unsetmagseq|unsetmagseq]].
 +
 +
==setmem==
 +
setmem ratio
 +
Sets a new ratio of free memory on memory used for stacking. Value should be between 0 and 1, depending on other activities of the machine. A higher ratio should allow siril to stack faster. Introduced in [[Siril:0.9.11|0.9.11]]. See also [[#setcpu|SETCPU]].
  
 
==split==
 
==split==
 
  split r g b
 
  split r g b
The command splits the color image into three distincts files (one for each color) and save them in r g and b file.
+
Splits the color image into three distincts files (one for each color) and save them in r g and b file.
 +
 
 +
==split_cfa==
 +
split_cfa
 +
Splits the CFA image into four distinct files (one for each channel) and save them in files.
  
 
==stack==
 
==stack==
   stack [filename] [type] [sigma low] [sigma high] [-nonorm, norm=]
+
   stack seqfilename
 +
  stack seqfilename { sum | min | max } [filtering] [-out=filename]
 +
  stack seqfilename { med | median } [-nonorm, norm=] [-filter-incl[uded]] [-out=filename]
 +
  stack seqfilename { rej | mean } sigma_low sigma_high [-nonorm, norm=] [filtering] [-out=filename]
  
This command stacks the ''filename'' sequence, using options.
+
With ''filtering'' being some of these in no particular order or number:
The allowed types are: ''sum'', ''max'', ''min'', ''med'' or ''median'', and ''rej'' or ''mean'' that requires the use of additional arguments sigma low and high used for the Winsorized sigma clipping rejection algorithm (cannot be changed from here).
+
  [-filter-fwhm=value[%]] [-filter-round=value[%]]
 +
  [-filter-quality=value[%]] [-filter-incl[uded]]
  
See the tooltips of the software for more information about the stacking methods and rejection types, or see the [[Siril#Start_using_Siril_.2F_Documentation|documentation]].
+
Stacks the ''seqfilename'' sequence, using options.
  
No image filtering from the sequence is applied: all are selected for stacking.
+
The allowed types are: ''sum'', ''max'', ''min'', ''med'' or ''median'', and ''rej'' or ''mean'' that requires the use of additional arguments sigma low and high used for the Winsorized sigma clipping rejection algorithm (cannot be changed from here). If no argument other than the sequence name is provided, sum stacking without filtering is assumed.
  
Normalization is automatically enabled for median and mean with rejection stacking methods. This can be overridden using the ''-nonorm'' flag or the -norm=''normalization'' option. The allowed normalization are: ''add'', ''addscale'', ''mul'' or ''mulscale''. For other methods, or with the use of the ''nonorm'' flag, normalization is disabled.
+
See the tooltips in the stacking tab for more information about the stacking methods and rejection types, or see the [[Siril#Start_using_Siril_.2F_Documentation|documentation]].
  
Stacked images for the sequence is created with the suffix "_stacked" and the configured FITS file extension.
+
Best images from the sequence can be stacked by using the filtering arguments. The filtering uses registration data, either with a value for the last image to take depending on the type of data used (between 0 and 1 for roundness and quality) or a percentage of best images to keep if the number is followed by a <tt>%</tt> sign. It is also possible to use manually selected images, either previously from the GUI or with the [[#select|select]] or [[#unselect|unselect]] commands.
  
Note that this command were added in the [[Siril:0.9.9|0.9.9]] release.
+
If several filters are added to the command, only images that pass all the filters will be stacked. There is consequently no order. If a filter is badly declared, because it has no registration data or a too low threshold, nothing will be stacked.
 +
 
 +
Normalization is automatically enabled for median and mean with rejection stacking methods. This can be overridden using the ''-nonorm'' flag or the -norm=''normalization'' option. The allowed normalization are: ''add'', ''addscale'', ''mul'' or ''mulscale''. For other methods, or with the use of the ''-nonorm'' flag, normalization is disabled.
 +
 
 +
Stacked image for the sequence is created with the name provided in the optional argument ''-out'', or with the name of the sequence suffixed "_stacked" and the configured FITS file extension. If a file with this name already exists, it will be overwritten without warning.
 +
 
 +
Note that this command was added in the [[Siril:0.9.9|0.9.9]] release and the filtering and output naming options were added in the [[Siril:0.9.11|0.9.11]] release.
  
 
==stackall==
 
==stackall==
stackall [type] [sigma low] [sigma high] [-nonorm, norm=]
+
  stackall
Opens all sequences in the CWD and stacks them with the optionally specified stacking type or with sum stacking.
+
  stackall { sum | min | max } [filtering]
See [[#stack|stack]] commands for options description.
+
  stackall { med | median } [-nonorm, norm=] [-filter-incl[uded]]
 +
  stackall { rej | mean } sigma_low sigma_high [-nonorm, norm=] [filtering]
 +
 
 +
With ''filtering'' being some of these in no particular order or number:
 +
  [-filter-fwhm=value[%]] [-filter-round=value[%]]
 +
  [-filter-quality=value[%]] [-filter-incl[uded]]
 +
 
 +
Opens all sequences in the current working directory (CWD) and stacks them with the optionally specified stacking type or with sum stacking. See [[#stack|stack]] commands for options description.
  
 
Stacked images for each sequence are created with the suffix "_stacked" and the configured FITS file extension.
 
Stacked images for each sequence are created with the suffix "_stacked" and the configured FITS file extension.
  
Note that all arguments were added in the [[Siril:0.9.8|0.9.8]] release.
+
Note that most options for this command were introduced in the [[Siril:0.9.8|0.9.8]] release and the filtering options were introduced in the [[Siril:0.9.11|0.9.11]] release.
  
 
==stat==
 
==stat==
Line 324: Line 441:
 
==unselect==
 
==unselect==
 
  unselect from to
 
  unselect from to
This command allows easy mass unselection of images in the loaded sequence (from - to). See [[#select|select]].
+
Allows easy mass unselection of images in the loaded sequence (from - to). See [[#select|SELECT]].
  
 
==unsetmag==
 
==unsetmag==
 
  unsetmag
 
  unsetmag
Reset the magnitude calibration to 0. See [[#setmag|setmag]].
+
Reset the magnitude calibration to 0. See [[#setmag|SETMAG]].
  
 
==unsetmagseq==
 
==unsetmagseq==
 
  unsetmagseq
 
  unsetmagseq
Reset the magnitude calibration and reference star for the sequence. See [[#setmagseq|setmagseq]].
+
Resets the magnitude calibration and reference star for the sequence. See [[#setmagseq|SETMAGSEQ]].
  
 
==unsharp==
 
==unsharp==
Line 344: Line 461:
 
==wavelet==
 
==wavelet==
 
  wavelet plan_number type
 
  wavelet plan_number type
Computes the wavelet transform on plan_number plans using linear (type=1) or bspline (type=2) version of the 'a trous' algorithm. The result is stored in a file as a structure containing the planes, ready for weighted reconstruction with wrecons.
+
Computes the wavelet transform on "nbr_plan" plans using linear (type=1) or bspline (type=2) version of the 'a trous' algorithm. The result is stored in a file as a structure containing the planes, ready for weighted reconstruction with WRECONS.
  
 
==wrecons==
 
==wrecons==
 
  wrecons c1 c2 ... cn
 
  wrecons c1 c2 ... cn
Reconstructs to current image from the planes previously computed with waveletand weighted with coefficients <tt>c1, c2, ..., cn</tt> according to the number of planes used for wavelet transform
+
Reconstructs to current image from the planes previously computed with wavelets and weighted with coefficients <tt>c1, c2, ..., cn</tt> according to the number of planes used for wavelet transform.

Latest revision as of 14:57, 2 September 2019

This page contains a list of commands available in the latest version of Siril. The command line is not widely used and rarely tested in its entirety and may not be considered stable yet, Commands are often added or modified, this means that the version of Siril you are using may not be the same as the version documented here.

Introduction

Siril has a command line in its graphical user interface and an ability to run scripts that are a list of commands. Most commands have an effect on the loaded image or sequence and allow them to be processed in some way without user intervention. With 0.9.9, we introduced commands that helped automating the processing of a sequence, like register and stack. They work on sequences that are not loaded.

The <SPACE> character is the delimiter between arguments. If you need to have spaces inside the arguments, you can use the quote or double quote, just like in a shell.

Commands can be typed in the command line at the bottom of Siril's main window. Another way is to put commands in a file and execute it as a script. To execute the file, use the @ token of the command line like so:

@file_name

Command stream (pipe)

Starting with 0.9.10, a new mode has been introduced in which commands can be sent through a named pipe and logs and status can be obtained through another. The mode is activated using the -p command line argument.

The protocol is quite simple: Siril receives commands and outputs some updates. Only commands that are marked as scriptable can be used with this system. Whenever the command inputs pipe is closed or the cancel command is given, the running command is stopped as if the stop button was clicked on in the GUI. The pipes are named siril_command.in and siril_command.out and are available in /tmp on Unix-based systems.

Outputs of siril on the pipe is a stream of one line text and formatted as follows:

  • log: followed by a log message
  • status: verb [subject], where verb can be either of starting, success, error or exit (exit message is not yet implemented). The subject is the current command name, except for exit that indicates that siril suffered a fatal error and has to exit.
  • progress: value% is the equivalent of the progress bar, it sends percents periodically, and sometimes 0% at the end of a processing as an idle information.

Commands history

These lists help you see what has changed in the last version, whether new or modified commands.

Siril command line functions reference

This is the list of commands available in the development version of Siril. Check the list above, some may not be available in your version.

addmax

addmax filename

addmax compute a new image IMG with IMG_1 and IMG_2. The pixel of IMG_1 is replaced by the pixel at the same coordinates of IMG_2 if the intensity of 2 is greater than 1. Do not forget to save the result.

asinh

asinh stretch

asinh command stretches the image for show faint objects, while simultaneously, preserve the structure of bright objects of the field.

bg

bg

Returns the background level of the image loaded in memory.

bgnoise

bgnoise

Returns the background noise level.

cd

cd directory

Set the new current working directory. directory can contain the ~ token, expanded as the home directory, directories with spaces in the name can be protected using single or double quotes. Examples:

  • cd ~/M42
  • cd '../OIII 2x2/'

cdg

cdg

Return the coordinates of the center of gravity of the image.

clear

clear

Clears the graphical output logs

clearstar

clearstar

Clear all the stars saved in memory and displayed on the screen.

close

close

Properly closes the opened image and the opened sequence, if any.

cosme

cosme filename

Apply the local mean to a set of pixels on the in-memory image (cosmetic correction). The coordinate of this pixels are in an ASCII file [list file]. COSME is adapted to correct residual hot and cold pixels after preprocessing.
The line P x y type will fix the pixel at coordinates (x, y) type is an optional character (C or H) specifying to Siril if the current pixel is cold or hot. This line is created by the command find_hot but you also can add some lines manually.
The line C x 0 type will fix the bad column at coordinates x.
The line L y 0 type will fix the bad line at coordinates y.

cosme_cfa

cosme_cfa filename

Same function that COSME but applying to RAW CFA images.

convertraw

convertraw basename [-debayer]

Convert DSLR RAW files into Siril's FITS images. The basename argument is the base name of the new sequence. The debayer option applies demosaicing to the pre-processed images, avoiding this extra step for processing.

crop

crop [x, y, width, height]

It can be used with the GUI: if a selection has been made with the mouse, calling the crop command without arguments crops it on this selection. Otherwise, or in scripts, arguments have to be given, with x and y being the coordinates of the top left corner, and width and height the size of the selection.

ddp

ddp level coef sigma

Performs a DDP (digital development processing) as described first by Kunihiko Okano. This implementation is the one described in IRIS. It combines a linear distribution on low levels (below level) and a non-linear on high levels. It uses a Gaussian filter of sigma sigma multiplies the resulting image by coef. The typical values for sigma are included between 0.7 and 2

entropy

entropy

Computes the entropy of the opened image on the displayed layer, only in the selected area if one has been selected or in the whole image else. The entropy is one way of measuring the noise or the details in an image.

exit

exit

Quits the application.

extract

extract NbPlane

Extracts NbPlane Planes of Wavelet domain.

fdiv

fdiv filename scalar

Divides the image in memory by the image given in argument. The resulting image is multiplied by the value of the scalar argument. Please check that the image is in the working directory. See also idiv.

fftd

fftd modulus phase

Applies a Fast Fourier Transform to the image loaded in memory. Modulus and phase given in argument are saved in FITS files.

ffti

ffti modulus phase

This function is used to retrieve corrected image applying an inverse transformation. The modulus and phase used are the files given in argument.

fill

fill value x y width height

Fills the whole current image (or selection) with pixels having the value intensity.

fill2

fill2 value x y width height

Same command than FILL but this is a symmetric fill of a region defined by the mouse. Used to process an image in the Fourier (FFT) domain.

find_cosme

find_cosme cold_sigma hot_sigma

This command applies an automatic detection of cold and hot pixels following the threshold written in arguments.

find_cosme_cfa

find_cosme_cfa cold_sigma hot_sigma

Same command than FIND_COSME but for monochromatic CFA images.

find_hot

find_hot filename cold_sigma hot_sigma

The command provides a list file "filename" (format text) in the working directory which contains the coordinates of the pixels which have an intensity "hot_sigma" times higher and "cold_sigma" lower than standard deviation. We generally use this command on a master-dark file.

findstar

findstar

Detects stars having a level greater than a threshold computed by Siril. The algorithm is based on the publication of Mighell, K. J. 1999, in ASP Conf. Ser., Vol. 172, Astronomical Data Analysis Software and Systems VIII, eds. D. M. Mehringer, R. L. Plante, & D. A. Roberts (San Francisco: ASP), 317.

After that, a PSF is applied and Siril rejects all detected structures that don't fulfill a set of prescribed detection criteria. Finaly, a circle is drawn around detected stars. See also the command CLEARSTAR.

fmedian

fmedian ksize modulation

Performs a median filter of size ksize [math] \times[/math]ksize (ksize MUST be odd) to the original image with a modulation parameter modulation. The output pixel is computed as : out [math]=[/math]mod [math] \times\ m + (1-[/math]mod[math]) \times [/math]in, where m is the median-filtered pixel value. A modulation's value of 1 will apply no modulation.

fmul

fmul scalar

Multiplies the loaded image by the scalar given in argument.

fixbanding

fixbanding amount sigma

Try to remove the canon banding. Argument "amount" define the amouont of correction. Sigma defines a protection level of the algorithm, higher sigma gives higher protection.

gauss

gauss sigma

Performs a Gaussian filter with the given sigma.

grey_flat

grey_flat

The function equalizes the mean intensity of RGB layers in a CFA images.

help

help

Gives the available commands.

histo

histo layer

Calculates the histogram of the image layer in memory and produces file histo_[layer name].dat in the working directory.

layer = 0, 1 or 2 with 0=red, 1=green and 2=blue.

iadd

iadd filename

Adds the image in memory to the image designed in argument. Please check that the image is in the working directory.

idiv

idiv filename

Divides the image in memory by the image given in argument. Please check that the image is in the working directory. See also fdiv.

imul

imul filename

Multiplies the image in memory by the image given in argument. Please check that the image is in the working directory.

isub

isub filename

Substracts the image in memory by the image given in argument. Please check that the image is in the working directory.

load

load filename
load filename.ext

Loads the image filename; it first attempts to load filename, then filename.fit and finally filename.fits and after, all supported format, aborting if none of these are found. These scheme is applicable to every Siril command implying reading files. Fits headers MIPS-HI and MIPS-LO are read and their values given to the current viewing levels. Writing a known extension at the end of filename will load the image filename.ext: this is used when numerous files have the same name but not the same extension.

Extensions supported are :

  • *.fit, *.fits, *.fts
  • *.bmp / *.jpg, *.jpeg / *.png / *.tif, *.tiff
  • *.ppm, *.pgm
  • *.pic (IRIS file)

log

log

Computes and applies a logarithmic scale to the current image.

ls

ls

Lists files and directories in the working directory.

mirrorx

mirrorx

Rotates the image around a vertical axis.

mirrory

mirrory

Rotates the image around an horizontal axis.

new

new width height nb_layers

Creates a new image filled with zeros with a size of width x height. The image is in 16-bit format, and it contains nb_layers layers, nb_layers being 1 or 3. It is not saved, but displayed and can be saved afterwards.

nozero

nozero level

Replaces null values by level values. Useful before an idiv or fdiv operation.

offset

offset value

Adds the constant value to the current image. This constant can take a negative value. As Siril uses unsigned fit files, if the intensity of the pixel become negative its value is replaced by 0 and by 65535 (for a 16-bit file) if the pixel intensity overflows. To check the minimum and maximum intensities values, click on the Auto level button and note the low and high threshold.

preprocess

preprocess sequencename [-bias=filename] [-dark=filename] [-flat=filename] [-cfa] [-debayer] [-stretch] [-flip] [-equalize_cfa] [-opt]

Preprocesses the sequence "sequencename" using bias, dark and flat given in argument. It is possible to specify if images are CFA for cosmetic correction purposes with the option "-cfa" and also to demosaic images at the end of the process with "-debayer". This option can be associated to "-stretch" in order to stretch to 16-bit the image during this operation (works only with images from DSLR). The "-flip" option tells to Siril to read image from up to bottom for demosaicing operation and the "-equalize_cfa" option equalizes the mean intensity of RGB layers of the CFA flat master. It is also possible to optimize the dark subtraction with "-opt".

Note that only hot pixels are corrected in cosmetic correction process

psf

psf

Performs a PSF (Point Spread Function) on the selected star.

Make a selection around a star and call the command PSF. It will give you:

  • The centroid coordinates (x0 and y0) in pixel units, which is the position of the center of symmetry of the fitted PSF.
  • The FWHM on the X and Y axis.
  • The rotation angle of the X axis with respect to the centroid coordinates.
  • The average local background.
  • The maximal intensity of the star: this is the peak value of the fitted function, located at the centroid coordinates x0 and y0.
  • The relative magnitude of the star.
  • The RMSE. This is an estimate of fitting quality. The smaller the RMSE is, the better the function is fitted.

To be relevant, the selection MUST be done on a non-saturated star.

register

register sequence [-norot] [-drizzle]

Performs geometric transforms on images of the sequence given in argument so that they may be superimposed on the reference image. The output sequence name starts with the prefix "r_". Using stars for registration, this algorithm only works with deepsky images. The option "-norot" performs a translation only with no new sequence built while the option "-drizzle" applies a x2 drizzle on the images

resample

resample factor

Resamples image with a factor "factor".

rgradient

rgradient xc yc dR dalpha

Creates two images, with a radial shift ("dR" in pixels) and a rotational shift ("dalpha" in degrees) with respect to the point ("xc", "yc"). Between these two images, the shifts have the same amplitude, but an opposite sign. The two images are then added to create the final image. This process is also called Larson Sekanina filter.

rl

rl iterations sigma

Restores an image using the Richardson-Lucy method. Iterations is the number of iterations to be performed (typically between 10 and 50). Sigma is the size of the kernel to be applied.

rmgreen

rmgreen type

rmgreen is a chromatic noise reduction filter. It removes green noise in the current image. This filter is based on PixInsight's SCNR Average Neutral algorithm and it is the same filter used by HLVG plugin in Photoshop. In command line, the lightness is always preserved. For image processing without L* preservation use the graphical tool box and uncheck the corresponding button.

Type=1 stands for Average Neutral Protection, while type=2 stands for Maximum Neutral Protection.

rotate

rotate degree

Rotates the image of an angle of degree value.

rotatepi

rotatepi

Rotates the image of an angle of 180° around its center. This is equivalent to the command "rotate 180" or "rotate -180".

satu

satu coeff

Enhances the global saturation of the image. Try iteratively to obtain best results. For example: satu 0.1

save

save filename

Saves current image to filename.fit. Fits headers MIPS-HI and MIPS-LO are added with values corresponding to the current viewing levels.

savebmp

savebmp filename

Saves current image under the form of a bitmap file with 8bits per channel: filename.bmp (BMP 24 bits).

savejpg

savejpg filename [quality]

Saves current image into a JPG file. You have the possibility to adjust the quality of the compression. A value 100 for quality parameter offers best fidelity while a low value increases the compression ratio. If no value is specified, it holds a value of 100. This command is very usefull to share an image in the jpeg format on the forums for example.

savepng

savepng filename

Saves current image as a PNG file.

savepnm

savepnm filename

Saves current image under the form of a Netpbm file format with 16bits per channel. The extension of the output will be filename.ppm for RGB image and filename.pgm for gray-level image. More details about the Netpbm format at : http://en.wikipedia.org/wiki/Netpbm_format.

savetif

savetif filename

Saves current image under the form of a uncompressed TIFF file with 16bits per channel.

savetif8

savetif8 filename

Same command than SAVE_TIF but the output file is saved in 8bits per channel.

select

select from to

This command allows easy mass selection of images in the loaded sequence (from - to, to included). Examples:

select 0 0

selects the first.

select 1000 1200

selects 201 images starting from number 1000

The second number can be greater than the number of images to just go up to the end.

See UNSELECT.

seqcrop

seqcrop

Crops the loaded sequence.

seqfind_cosme

seqfind_cosme cold_sigma hot_sigma

Same command than FIND_COSME but for the loaded sequence.

seqfind_cosme_cfa

seqfind_cosme_cfa cold_sigma hot_sigma

Same command than FIND_COSME_CFA but for the loaded sequence.

seqpsf

seqpsf

Same command than PSF but works for sequences. Results are dumped in the console in a form that can be used to produce brightness variation curves.

setcpu

setcpu number

Defines the number of processing threads used for calculation. Can be as high as the number of virtual threads existing on the system, which is the number of CPU cores or twice this number if hyper-threading (Intel HT) is available. The default value is the maximum number of threads available, so this should mostly be used to limit processing power. See also SETMEM.

setext

 setext extension

Sets the extension used and recognized by sequences. The argument "extension" can be "fit", "fts" or "fits".

setfindstar

setfindstar ksigma roundness

Defines thresholds above the noise and star roundness for all subsequent stars detection with FINDSTAR and REGISTER commands of the session. Ksigma must be greater or equal to 0.05 and roundness between 0 and 0.9.

The threshold for star detection is computed as the median of the image (which represents in general the background level) plus Ksigma times sigma, sigma being the standard deviation of the image (which is a good indication of the noise amplitude). If you have many stars in your images and a good signal/noise ratio, it may be a good idea to increase this value to speed-up the detection and false positives.

The roundness argument is the minimal ratio of the short axis on the long axis of the star Gaussian fit (see PSF). A value of 1 would keep only perfectly round stars, a value of 0.5, the default, means that stars detected twice as big on an axis as on the other will still be used for registration.

It is recommended to test the values used for a sequence with Siril's GUI, available in the dynamic PSF toolbox from the analysis menu. It may improve registration quality to increase the parameters, but it is also important to be able to detect several tens of stars in each image.

setmag

setmag magnitude

Calibrates the magnitude by selecting a star and giving the known apparent magnitude. All PSF computations will return the calibrated apparent magnitude afterwards, instead of an apparent magnitude relative to ADU values. To reset the magnitude constant see UNSETMAG.

setmagseq

setmagseq magnitude

This command is only valid after having run seqpsf or its graphical counterpart (select the area around a star and launch the psf analysis for the sequence, it will appear in the graphs). This command has the same goal as setmag but recomputes the reference magnitude for each image of the sequence where the reference star has been found. When running the command, the last star that has been analysed will be considered as the reference star. Displaying the magnitude plot before typing the command makes it easy to understand. To reset the reference star and magnitude offset, see unsetmagseq.

setmem

setmem ratio

Sets a new ratio of free memory on memory used for stacking. Value should be between 0 and 1, depending on other activities of the machine. A higher ratio should allow siril to stack faster. Introduced in 0.9.11. See also SETCPU.

split

split r g b

Splits the color image into three distincts files (one for each color) and save them in r g and b file.

split_cfa

split_cfa

Splits the CFA image into four distinct files (one for each channel) and save them in files.

stack

 stack seqfilename
 stack seqfilename { sum | min | max } [filtering] [-out=filename]
 stack seqfilename { med | median } [-nonorm, norm=] [-filter-incl[uded]] [-out=filename]
 stack seqfilename { rej | mean } sigma_low sigma_high [-nonorm, norm=] [filtering] [-out=filename]

With filtering being some of these in no particular order or number:

 [-filter-fwhm=value[%]] [-filter-round=value[%]]
 [-filter-quality=value[%]] [-filter-incl[uded]]

Stacks the seqfilename sequence, using options.

The allowed types are: sum, max, min, med or median, and rej or mean that requires the use of additional arguments sigma low and high used for the Winsorized sigma clipping rejection algorithm (cannot be changed from here). If no argument other than the sequence name is provided, sum stacking without filtering is assumed.

See the tooltips in the stacking tab for more information about the stacking methods and rejection types, or see the documentation.

Best images from the sequence can be stacked by using the filtering arguments. The filtering uses registration data, either with a value for the last image to take depending on the type of data used (between 0 and 1 for roundness and quality) or a percentage of best images to keep if the number is followed by a % sign. It is also possible to use manually selected images, either previously from the GUI or with the select or unselect commands.

If several filters are added to the command, only images that pass all the filters will be stacked. There is consequently no order. If a filter is badly declared, because it has no registration data or a too low threshold, nothing will be stacked.

Normalization is automatically enabled for median and mean with rejection stacking methods. This can be overridden using the -nonorm flag or the -norm=normalization option. The allowed normalization are: add, addscale, mul or mulscale. For other methods, or with the use of the -nonorm flag, normalization is disabled.

Stacked image for the sequence is created with the name provided in the optional argument -out, or with the name of the sequence suffixed "_stacked" and the configured FITS file extension. If a file with this name already exists, it will be overwritten without warning.

Note that this command was added in the 0.9.9 release and the filtering and output naming options were added in the 0.9.11 release.

stackall

 stackall
 stackall { sum | min | max } [filtering]
 stackall { med | median } [-nonorm, norm=] [-filter-incl[uded]]
 stackall { rej | mean } sigma_low sigma_high [-nonorm, norm=] [filtering]

With filtering being some of these in no particular order or number:

 [-filter-fwhm=value[%]] [-filter-round=value[%]]
 [-filter-quality=value[%]] [-filter-incl[uded]]

Opens all sequences in the current working directory (CWD) and stacks them with the optionally specified stacking type or with sum stacking. See stack commands for options description.

Stacked images for each sequence are created with the suffix "_stacked" and the configured FITS file extension.

Note that most options for this command were introduced in the 0.9.8 release and the filtering options were introduced in the 0.9.11 release.

stat

stat

Returns global statistic of the current image. If a selection is made, the command returns global statistic within the selection.

threshlo, threshhi, thresh

These are threshold functions:

  • threshlo 40 replaces values below 40 with 40;
  • threshhi 1000 replaces values above 1000 with 1000;
  • thresh 40 1000 does both.

unselect

unselect from to

Allows easy mass unselection of images in the loaded sequence (from - to). See SELECT.

unsetmag

unsetmag

Reset the magnitude calibration to 0. See SETMAG.

unsetmagseq

unsetmagseq

Resets the magnitude calibration and reference star for the sequence. See SETMAGSEQ.

unsharp

unsharp sigma multi

Applies to the working image an unsharp mask with sigma sigma and coefficient multi.

visu

visu low high

Displays an image with low and high as the low and high threshold.

wavelet

wavelet plan_number type

Computes the wavelet transform on "nbr_plan" plans using linear (type=1) or bspline (type=2) version of the 'a trous' algorithm. The result is stored in a file as a structure containing the planes, ready for weighted reconstruction with WRECONS.

wrecons

wrecons c1 c2 ... cn

Reconstructs to current image from the planes previously computed with wavelets and weighted with coefficients c1, c2, ..., cn according to the number of planes used for wavelet transform.