Stacking stacked FITS files has a 16-bit conversion problem

When I try to stack stacked files using the OSC_Preprocessing.ssf script, Siril tells me that it can’t convert the 32-bit FITS files to 16-bit. This is because stacked FITS data is 32-bit by default, and “convert” refuses to save it. I tried “set16bits” before saving but it still seems to yield 32-bit FITS files. I tried savetif() instead of save(), and it saves it as 16-bit TIF. That works, but is there a way in which I can save it as a 16-bit FITS?

When I try to stack them, there is a second problem: Siril tells me that the dimensions of the lights are incompatible. That makes sense, as the lights are stacked data. DSS and PixInsight have no problems stacking 32-bit FITS files with incompatible sizes, but Siril does. Is there a way in which I can stack subs of different dimensions with Siril?

I found that when I load a 32-bit FITS file and select 16 bits from the menu, the “save” command will save a 16-bit FITS file. I was expecting that “set16bits” would do the same, as the command reference explicitly states that it will force saving in 16 bits. I don’t see that happening.

I discovered that I can crop the image of the batch-stacked files if I want the sizes all to be the same. So, I saved them in TIF format (which is 16-bits), and expected success. But it failed again complaining about size. I think this is caused by the saved TIF having 3 layers, one for each color, and that I need to Bayer them to a single layer in order for the stacking of stacked files to be successful. The result must be saved in a raw Bayer file format. Not sure how to do that, or if Siril can do that. I think I understand the issues and will have to give up and use DSS or PixInSight for stacking the batch-stacked files.

Can you detail also exactly what you are trying to achieve? Because OSC_Preprocessing.ssf script is for calibrating, registering and stacking a single batch of images, so it does not look like the right tool to “stack stacked files”.

Also please, when reporting an error, attach a log so that we can see exactly the message that was thrown and identify where in the code the problem happened: How to report issues — Siril 1.4.3 documentation

Thanks, I figured it out. I was using OSC_Preprocessing,ssf to stack the stacked files. It will perform a “convert” command that will fail. However, I was able to create a sequence file manually, register the specified stacked files, then it stacked just fine.

I was looking for a “seqcreate” command but this is not part of the official API, so I had to create the squence file manually for my test. This can easily be done in Python. So, I solved my issue and this can be closed.