This is useful for short-exposure AP to mitigate poor tracking, field rotation and replace autoguiding with periodically plate-solved based tracking as has been popularized by smart telescopes. We would like to stack in batches while deleting subs that are no longer needed, in real time, to save disk space and stacking time. Eventually the stacked files need to be stacked the classical way. DSS and PixInSight can do this, but Siril can’t: It gives an error about incompatible dimensions (3 layers) and also about refusing to load 32-bit data. We need 2 things: (1) the ability to load 3-layer lights for stacking, and (2) a command to save the stacked batch data as 16 bits (the set16bits command alone somehow cannot do this despite the documentation saying that it can). Thanks in advance!
I don’t know what you are saying. But of course Siril can load 32 bits and 3 layers data.
Stacking images with different sizes is of course not possible, but this is the case With every software you need first to align them. It will make them to the same size.
However, if you try to stack 1 layer with 3 layers. Of course it will not work. But again, this is normal.
Thanks, you are correct. I figured it out. I did a test where I created a sequence file manually, then registered the specified lights (stacked data, 32-bit, 3-layer) and they stacked just fine. This request can be closed and deleted.
To be clear, I want to stack stacked files. One feature that is missing for this in Siril is an API function to create a sequence. Normally, sequences are created using convert() operating on raw 1-layer Bayered files. however, I can’t use that for stacked files because they have 3 layers (they are already in converted format). Thus, I resort to reverse-engineering the sequence file to create a sequence, which users are not supposed to do. If you could add a seqcreate() function in the API that would be great.
I think you don’t understand how it works.
Sequence are built before every command that use a sequence. So, the stack command, for example, can build the sequence.
I use the Python API. The command reference says that register and stack use the sequence name as their first and mandatory parameter. Can you explain how I can use the register and stack commands without a sequence?
Just take a look to the SSF script that are provided with Siril. It should help you to understand.
I started out translating OSC_Preprocessing.ssf to Python and do exactly the same steps for the first round where I stack lights using the calibration files under masters. No problem. The calibrate and stack commands magically create the sequence files. But for the second round where I start with 3-layer lights that are already stacked, I skip the calibrate command and start with register - just look at the logic in the ssf file. But, register does not create a sequence file, and that is the problem. The only way I see is to create the .seq file manually.
The way to go very much depend on where the images are stored and how they are named:
- If all your stacks are stored in a single folder (and it contains only those stacks), you can use a
convertcommand once you have cd’ed to this folder. What you are stating here:Normally, sequences are created using convert() operating on raw 1-layer Bayered files. however, I can’t use that for stacked files because they have 3 layers (they are already in converted format)is not correct. And if it fails for some reason (just tried again with a bunch of 3-layer images, convert does create a sequence), please report pasting what the log says. - If they are already named say
stack_00001.fit,stack_00002.fit, theregistercommand will create the .seq as required.
In any case, the python API has a create_new_seq function: Sirilpy Python Module API 1.0.25 Reference — Siril 1.4.3 documentation, so if you need to create a seq file which follows strictly siril syntax, pls use it as the format will evolve in the future.
C.
Ah - very good, thank you. I used 1.4.2 that does not have the create_new_seq command, and I also don’t see it yet in the general 1.4.3 command reference, I assume it will be there soon.
BTW I tried convert on my lights and you are right, it creates a sequence file; it is just not intuitive to me because the stacked files are already in a converted format, I thought. Maybe I thought wrong; good to know I can apply it even when effectively it just copies it to a file with a prefix in the filename.
Thanks, I can now simplify my script.
Maybe, there’s a misunderestung on what “convert” means. It does not mean convert images to a given file format. It means convert whichever images there are to a sequence usable by Siril. Most times, it will be just by means of symbolic links. If they are raw, it will also create files to FITS format. But convert is really about creating a sequence.
The function create_new_seq has been around for a few versions, at least 1.4.0, so i don’t understand what you mean… it’s in the python api, so you should look up there, not in the command reference (just follow the link i gave).
.
Yes create_new_seq() is indeed there and it works - thanks! Sorry being new and working from an example, my focus was on the cmd() function only and missed the entire rest of the API.
I still have trouble with the convert() function getting messages like:
14:26:40: Reading FITS: file int_25_M_51_2026-03-12T06-23-44_350.fits, 3 layer(s), 3120x2088 pixels, 32 bits
14:26:40: Converting 32 bits images (from C:\junk\siril\M_51\finalLights\int_25_M_51_2026-03-12T06-23-44_350.fits) to 16 bits is not supported, ignoring file.
The input FITS file is a 3-layer 32-bit file that was obtained by stacking. Fortunately, I don’t need it anymore now that I use create_new_seq().
Ok, I will take a wild guess here, based on the log:
- you are on Windows and haven’t enabled symbolic links via developer mode (see the first warning orange box at this link: Conversion — Siril 1.4.3 documentation)
- or you are on linux/mac and you have unticked the symbolic Link box in the Conversion Tab
- in any case, in the Preferences, you are set to work in 16b
Why you get this error:
As symbolic links are not enabled, conversion must make a hard copy of each file. But as they are 32b images and your preferences says I want to work in 16b, it would mean decimating to a poorer format and we have a safeguard against that, which is the message you see.
Solution:
Enable developer mode if on Windows and make sure symbolic links are enabled in the Conversion tab (it’s enabled by default).