Now that you have the luminance, try adding an overall blue cast to make it feel more like a nighttime shot.
The problem is, it all gets VERy un-natural, as even if Imake blue-ish it looks like a blue-ish day, ot like a normal night ...
dang nice, im still a bit confused about this whole dark frame subtraction thing and raw sum and average and im running in circles now lol.
ok, quick explanation of stacking and averaging...
Suppose you have a black and white camera, 1 pixel x 3 pixels
An image would be made of three pixels, each pixel would have its luminosity expressed as a number (from 0 to 255).
A completely black image is something like this:
0 0 0
A completely white image is something like this
255 255 255
A well exposed image has a good range of values, eg
32 95 145
A night-time shot is very dark:
2 4 8
If you expose more (let's say 10 times longer), you get more light.
20 40 80
The problem is, the longer you expose, more "noise" you have (the numbers have small errors in them)
23 39 75
But, if noise is really noise, it's random, (sometimes giving a higher value and sometimes a lower value). S0, let's take 4 identical shots of the same image
a 23 39 75
b 19 35 79
c 22 44 83
d 18 42 80
If we do an average of each pixel, we can hope to avoid some noise and have a better image:
avg: 21 40 79 (averages of each pixel)
That is closer to out "theoretical" 20 40 80 image, and about of the same luminosity
If, on the contrary, we just add each column, errors get again summed up (so, hopefully they compensate for each other) but the image is obvioulsy much brighter: this is what is called stacking
sum: 83 160 317
In a real case, 317 is over out range of 0-255, so it stays to 255.
sum: 83 160 255
(this image is then partailly over-exposed)
In real cases, you have more than 3 pixels (you have a few millions of them) and you have more than a number per each pixel (actually, you have 1 for each RGB channel) but that's the idea.