(→Siril command line functions reference)
(→Introduction: introducing the pipe)
|Line 3:||Line 3:|
command line the Siril.., the , like .
Another way is to put commands in a file
Another way is to put commands in a file and execute script. To execute the file, use the '''@''' token of the command line like so:
with [[0.9.9]], commands a [[#|]]and on .
Revision as of 00:33, 13 November 2018
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.
- 1 Introduction
- 2 Commands history
- 3 Siril command line functions reference
- 3.1 addmax
- 3.2 bg
- 3.3 bgnoise
- 3.4 cd
- 3.5 cdg
- 3.6 clear
- 3.7 clearstar
- 3.8 close
- 3.9 cosme
- 3.10 cosme_cfa
- 3.11 convertraw
- 3.12 crop
- 3.13 ddp
- 3.14 entropy
- 3.15 exit
- 3.16 extract
- 3.17 fdiv
- 3.18 fftd
- 3.19 ffti
- 3.20 fill
- 3.21 fill2
- 3.22 find_cosme
- 3.23 find_cosme_cfa
- 3.24 find_hot
- 3.25 findstar
- 3.26 fmedian
- 3.27 fmul
- 3.28 fixbanding
- 3.29 gauss
- 3.30 grey_flat
- 3.31 help
- 3.32 histo
- 3.33 iadd
- 3.34 idiv
- 3.35 imul
- 3.36 isub
- 3.37 load
- 3.38 log
- 3.39 ls
- 3.40 mirrorx
- 3.41 mirrory
- 3.42 new
- 3.43 nozero
- 3.44 offset
- 3.45 preprocess
- 3.46 psf
- 3.47 register
- 3.48 resample
- 3.49 rl
- 3.50 rmgreen
- 3.51 rotate
- 3.52 rotatepi
- 3.53 satu
- 3.54 save
- 3.55 savebmp
- 3.56 savejpg
- 3.57 savepng
- 3.58 savepnm
- 3.59 savetif
- 3.60 savetif8
- 3.61 select
- 3.62 seqcrop
- 3.63 seqfind_cosme
- 3.64 seqfind_cosme_cfa
- 3.65 seqpsf
- 3.66 setcpu
- 3.67 setext
- 3.68 setfindstar
- 3.69 setmag
- 3.70 setmagseq
- 3.71 split
- 3.72 stack
- 3.73 stackall
- 3.74 stat
- 3.75 threshlo, threshhi, thresh
- 3.76 unselect
- 3.77 unsetmag
- 3.78 unsetmagseq
- 3.79 unsharp
- 3.80 visu
- 3.81 wavelet
- 3.82 wrecons
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:
Starting with 0.9.10, commands can be streamed through a named pipe. The protocol is quite simple: Siril receives commands and outputs some updates. Specific commands have been added for this use: stop. The pipe will is named
siril_command and is available in /tmp on Unix-based systems.
These lists help you see what has changed in the last version, whether new or modified commands.
- 0.9.10: setfindstar, grey_flat
- 0.9.9: convertraw, preprocess, register, stack, close, clear, setext, @
- 0.9.8: savepng, stackall
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 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.
Returns the background level of the image loaded in memory.
Returns the background noise level.
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/'
Return the coordinates of the center of gravity of the image.
Clears the graphical output logs
Clear all the stars saved in memory and displayed on the screen.
Properly closes the opened image and the opened sequence, if any.
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.
Same function that COSME but applying to RAW CFA images.
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 x, y, width, height
Crops the current image within the rectangle previously selected.
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
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.
Quits the application.
Extracts NbPlane Planes of Wavelet domain.
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 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 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 value x y width height
Fills the whole current image (or selection) with pixels having the value intensity.
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 cold_sigma hot_sigma
This command applies an automatic detection of cold and hot pixels following the threshold written in arguments.
find_cosme_cfa cold_sigma hot_sigma
Same command than FIND_COSME but for monochromatic CFA images.
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.
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 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.
Multiplies the loaded image by the scalar given in argument.
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.
Performs a Gaussian filter with the given sigma.
The function equalizes the mean intensity of RGB layers in a CFA images.
Gives the available commands.
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.
Adds the image in memory to the image designed in argument. Please check that the image is in the working directory.
Divides the image in memory by the image given in argument. Please check that the image is in the working directory. See also fdiv.
Multiplies the image in memory by the image given in argument. Please check that the image is in the working directory.
Substracts the image in memory by the image given in argument. Please check that the image is in the working directory.
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)
Computes and applies a logarithmic scale to the current image.
Lists files and directories in the working directory.
Rotates the image around a vertical axis.
Rotates the image around an horizontal axis.
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.
Replaces null values by level values. Useful before an idiv or fdiv operation.
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 sequencename [-bias=filename] [-dark=filename] [-flat=filename] [-cfa] [-debayer] [-flip]
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". The "-flip" option tells to Siril to read image from up to bottom for demosaicing operation.
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 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
Resamples image with a factor "factor".
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 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.
Rotates the image of an angle of degree value.
Rotates the image of an angle of 180° around its center. This is equivalent to the command "rotate 180" or "rotate -180".
Enhances the global saturation of the image. Try iteratively to obtain best results. For example: satu 0.1
Saves 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 under the form of a bitmap file with 8bits per channel: filename.bmp (BMP 24 bits).
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.
Saves current image as a PNG file.
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.
Saves current image under the form of a uncompressed TIFF file with 16bits per channel.
Same command than SAVE_TIF but the output file is saved in 8bits per channel.
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.
Crops the loaded sequence.
seqfind_cosme cold_sigma hot_sigma
Same command than FIND_COSME but for the loaded sequence.
seqfind_cosme_cfa cold_sigma hot_sigma
Same command than FIND_COSME_CFA but for the loaded sequence.
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.
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.
Sets the extension used and recognized by sequences. The argument "extension" can be "fit", "fts" or "fits".
setfindstar sigma roundness
Defines thresholds above the noise and star roundness for stars detection with FINDSTAR and REGISTER commands. Sigma must be greater or equal to 0.05 and roundness between 0 and 0.9. See FINDSTAR.
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.
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.
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.
stack filename [type] [sigma low] [sigma high] [-nonorm, norm=]
Stacks the filename 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 is assumed.
See the tooltips in the stacking tab for more information about the stacking methods and rejection types, or see the documentation.
No image filtering from the sequence is applied: all are selected for stacking.
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 images for the sequence is created with the suffix "_stacked" and the configured FITS file extension.
Note that this command was added in the 0.9.9 release.
stackall [type] [sigma low] [sigma high] [-nonorm, norm=]
Opens all sequences in the 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 all arguments were added in the 0.9.8 release.
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 from to
Allows easy mass unselection of images in the loaded sequence (from - to). See SELECT.
Reset the magnitude calibration to 0. See SETMAG.
Resets the magnitude calibration and reference star for the sequence. See SETMAGSEQ.
unsharp sigma multi
Applies to the working image an unsharp mask with sigma sigma and coefficient multi.
visu low high
Displays an image with low and high as the low and high threshold.
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 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.