Processing a nightscape in Siril: a tutorial

Thanks @sguyader
Another question, you didn’t subtracted the bias from the darks, as the link you provided suggests.
Any particular reason?

Well, that’s also a question I’ve asked myself. In fact I followed the steps found in the scripts uploaded on the Siril website, thinking that they follow the gold standard.
The bias master frame is subtracted from the flat field master frame, but not from the dark master frame. Why? I don’t know. It’s something we should ask to the authors of Siril.

1 Like

Here’s what the Siril guys say about Bias/Offset and Dark frames (excerpt from here):

Dark

Dark frames are made at the same exposure time and ISO as the subject light frames but in the dark: use your lens/telescope cap or close the shutter for example. They contain the thermal noise associated with the sensor, the noise being proportional to temperature and exposure time. Hence, they should be made at approximately the same temperature as the light frames, this is the reason why we make dark frames at the end, or in the middle of the imaging session. Like with the BIAS frames, the more dark exposures are used for the calculation of the master dark, the less noise will be introduced into the corrected images. The master dark frame should be created by stacking dark frames with the median algorithm (or Winsorized by checking the rejection levels at the end of the process, they should be lower than 0.5 percent), but be sure to use No Normalisation .

WARNING: Remember that dark frames are always composed from real dark signal and bias signal. If you don’t apply dark optimization, you can leave the bias signal and your masterDark will be in fact masterDark+masterBias. In consequence subtracting this master to the light frames will remove both signals. However, applying dark optimization makes things different by multiplying masterDark by a coefficient factor not equal to 1. In this case, you must subtract masterBias from each dark frame.

So, my interpretation is that if you follow the tutorial, subtracting the master dark frame from the light frames removes also the bias/offset signal. This is why the bias/offset master frame by itself is used only for the flat field frames treatment.

1 Like

In summary, no need to subtract bias from darks, correct?

That’s my understanding, using the workflow I posted.
In fact, a dark frame also contains bias/offset signal, so it makes sense: subtracting the dark master removes both the “true” dark noise as well as the bias noise.

1 Like

Yes, I think it averages out, but @gadolf you could try both just to be sure. :nerd_face::joy_cat:

1 Like

A good tutorial, and I’m busy going through it. I’ve got Siril 0.9.10, running on a MacBook Pro under Mojave (10.14.4).

One point, I would like to make: you say ‘Now go to the “Register” tab, and simply click “Go register” keeping the default option (which I take is ‘One Star Registration’).’ I cannot simply click “Go register”; I have to ‘select an area in image first’. So the question is: What do I select? A small portion of the image, or the entire image?

Cheers,
Biff

Hi,

First of all, thanks for trying to follow the tutorial.
I don’t have Siril in front of me, but I think by default it was set to “Global star alignment”, which is what you need to use for alignment of untracked frames (as there is some rotation, and “One star registration” allows only for shifting, not rotating). Maybe there’s a difference in defaults since version 0.9.10, or in the Mac version.
So, try to set the method to “Global star registration” and see if it works.

2 Likes

I did. It did!! :+1:
Thanks for the prompt reply.

Cheers,
Biff

Glad it worked! I just checked the latest version from git (0.9.11), and here on Linux the default is still “Global star registration”. So maybe it was a Mac thing.

By the way, my original tutorial has been edited as a pixls.us article here.

Edit: @Biff before trying my tutorial, did you by any chance select yourself “One star registration” in a previous attempt? I see that if you just select “One star registration” and close the program, on the next program launch it keeps the algorithm you have selected the last time.

Hello,

reading the above contributions, I think I should clarify somewhat the meaning of the technical terms dark, bias, flatfield.

dark: Each pixel in a CCD accumulates charge (i.e. signal) even without light falling on it. This is due to the thermal motion of the atoms in the detector. As such, it can vary from pixel to pixel, it is a function of temperature and it is (except in hot and cold pixels) proportional to the exposure time. The noise introduced by the dark in the image cannot be removed by dark subtraction. Dark subtraction can only remove patterns in the dark distribution. Therefore it makes sense to derive a dark frame as an average over as many darks as possible, each with an exposure time as long as possible. In astronomical practice, dark frames are taken with an exposure time of at least one hour.
bias: This is a constant signal introduced by the electronics of the CCD camera to avoid the occurrence of negative values in the data due to read-out-noise for unsigned integer representation. If the bias is not subtracted, the CCD data are not linear, with severe consequences for image calculations! In an astronomical data reduction workflow, the first step is to subtract the bias from all frames. Then you have to bother no more about it. However, this only works correctly in 32bit-data or higher, not in unsigned integer 16bit data. If you do not subtract the bias from the dark frames, subtracting the correctly averaged darks from the images also, of course, subtracts the bias.
Flatfield: It not only corrects vignetting, as stated above, but its prime purpose is to remove the pixel-to-pixel sensitivity variations in the detector and any global sensitivity variation across the detector. Each pixel has its own individual sensitivity to light. So even if the detector is illuminated by a spatially constant light flux, its signal would not be constant without the flatfield correction. Dark frames are not flatfield corrected since the source of the signal is not the incoming light. Depending on the exposure time, flatfield frames may have to be dark subtracted. Bias has to be subtracted from them in any case.

I do not know, if the raw CCD-data from a consumer camera are already flatfielded to some extend by a camera-specific flatfield frame stored in the camera. This may well be the case and would reduce the purpose of flatfield frames to remove vignetting in the optics, as stated above.

I hope this helps understanding the procedures described above.

If you want to read the gory details I can refer to the EMVA standard 1288 or the book by Richard Berry & James Burnell (2005) “Handbook of astronomical image processing”, which is oriented at the amateur astronomer.

Hermann-Josef

4 Likes

@Jossie, I bookmarked this post. I’ve been following threads in the DPReview Astrophotography forum for about a year now, and from that developed a fragmented understanding of these terms. Your explanations are quite clear and complete - Thanks!

The practitioners at that forum who use consumer cameras do all of the above, mostly with CMOS sensors. Even for my regular photography, understanding these mechanics have helped me more appropriately consider the phenomenon of noise in the lower end of my cameras’ sensors.

@ggbutcher
What I had written above applies to both detectors, CCD and CMOS. In professional astronomy only CCD-cameras are used due to the higher fraction of light sensitive area.

Hermann-Josef

1 Like

As far as I can recollect, no. Your tutorial was my first attempt at running, and using, Siril. Whether I inadvertently selected the ‘One star registration’ is something else. I don’t think so.

Anyway, the correct selection is now documented: I couldn’t find anything on the Siril website either.

Thanks anyway.
Cheers,
Biff

1 Like

Hi Sabastein,
Thank you for the excellent tutorial on Siril stacking! I have been struggling for 6 months and keep getting one error or other and now able to use the program like a charm. Thanks again. I am new to GIMP (don’t have photoshop) and just started learning. Could you put up a brief tutorial on the masking and adding or stacking pictures please! :grin:K. Gee

Hi @gee_kohler,

A quick tutorial showing what I do (but there are several ways to do it):

  1. In Gimp, click on File > Open as Layers... to load both the foreground and sky images. You end up with 2 layers

  2. Here the foreground is the top layer. Right click on that layer and choose Add layer mask... and check White (full opacity), this adds a layer mask to the foreground layer. As the mask is white, the foreground will still mask out the bottom (background) layer:

  3. Painting black over the sky area will reveal the background layer. if the sky occupies a large portion of the image, you can draw a large selection rectangle over the sky and use the Bucket Fill Tool to fill the selection with black color (make sure to click on the layer mask before applying the bucket fill tool, so it will apply the color only on the layer mask):

  4. Remove the selection (Select > None), and refine/finish the layer mask with a brush. Check the mask itself with right click on the mask > Show Layer Mask:

  5. When satisfied with mask, merge the layers with Image > Flatten Image, and do whatever you want in Gimp with colors/contrast/dodge/burn… or export the result if you’re satisfied.

Hope this helps!

1 Like

I’ve heard that it is better to create a (proper) dark frame master (created from multiple dark frames, same iso/temp/duration) than use the single dark frame that is built in to cameras when the duration is longer than 1sec, whether the photo is astro or just dark (such as night scenes in town). Can Siril be used for this purpose, night photos around town?

I’m not sure about cameras that manage dark frames on their own, I guess cameras only use one frame, while in siril you can use a master build from several. Yes siril can be used for that. It does not preserve white balance and other camera settings though, so post-processing will be required.

For city pictures, I’m not sure you will see a lot of difference because you have some bright lights in the picture where signal is high, while in astronomy we are more interested in parts of the images where signal is very low and where the dark current is relatively important.

As you said, you need to have the same iso/temp/duration as the real frames, so it would require a lot of work if you have a long session with different expositions…

Yes, there are differences between the amount of light in a night cityscape and astrophotography but what I was/am concerned about is, in the dark regions of my city photos (night sky above the city), can I use a series of master dark frames taken that same night and put them in Siril, along with the (single) light frame and have Siril try to remove noise from the dark areas of the sky. It appears that Siril will do that, which is perfect. I was concerned that Siril might be trying to match the image with a constellation in the sky (which it wouldn’t be able to match it with). Thanks

The script fails using version 0.99.10.1 and 0.99.8.1running the rl 10 0.6 command “Error in line 62: ‘rl’”. When I comment the line out, the script completes however there output looks very sparse.

Had a good look and realised that the ‘rl’ command syntax has changed ‘rl 1 0.5 10’ excutes though what the values should be is a mystery. Still look very sparse.