Black level

Questions, support and discussions
Serg1
Posts: 37
Joined: 30 Sep 2018, 05:14

Black level

Post by Serg1 » 30 Sep 2018, 05:31

Hello Han.
After calibration, the color black is very black.
What happens to pixel values after dark is subtracted from light if it is less than 0?
Is it equal to 0 or is the black level shifted to the minimum value?
Can you add the ability to offset the black level to make it gray?

han.k
Posts: 174
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Black level

Post by han.k » 30 Sep 2018, 12:51

Hello Serg,

I assume you have set in the viewer the minimum/maximum settings to medium, high or low.

What are the pixel values if you move across the image. It should be capable to indicate negative values.

If the dark is taken under the same conditions {exposure, temperature) as the light frame the values should be positive. The light frame pixel values are based on the dark current and light received. Secondly in the camera setting you can set an offset. This will guarantee positive values for the 16 bit data [0.65535] Fundamental 6 bit fits can't contain negative values. If the offset is set correctly each frame pixels will be based on:

Light frame:
offset+darkcurrent+ light

Dark frame:
offset+darkcurrent

You can check the offset setting by taking 0.001 seconds exposure (bias). If the offset is set correctly, the pixel values should be maybe 300 or 1000 plus a little noise

For the case this is not true, the program will work with negative values but displaying them will fail. You could use in tab pixel_math, tool "+x-" a fixed value to the image to display it. This should work, but it is never tested for negative value. However if the values are negative, there is fundamental something wrong with the offset. Pixel values in the light frame should be always be higher then the dark frame.

Han

Serg1
Posts: 37
Joined: 30 Sep 2018, 05:14

Re: Black level

Post by Serg1 » 30 Sep 2018, 16:12

Calibrated light = (Light frame)-(Dark frame) = (offset+darkcurrent_1+ light)-(offset+darkcurrent_2)=darkcurrent_1+ light-darkcurrent_2
darkcurrent_2 not equal darkcurrent_1 because they are random processes.
darkcurrent_2 = darkcurrent_1 they will be equal only if the number of frames is infinite.
See sample file. The pixel value is about -50, displayed as 0.
If I use the "+x-" tool in the pixel_math tab to display a fixed image value, the background is gray and looks natural.
Can I save this offset in the light sum file?
Attachments
Black_Level.jpg
sample
Black_Level.jpg (510.77 KiB) Viewed 5010 times

han.k
Posts: 174
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Black level

Post by han.k » 30 Sep 2018, 18:19

I was too quick. Yes your correct, the sum of the light offset and dark offset should be zero. You will need them only to keep the noise in the dark current and other noise positive.

I will look into the code what I did. For most cases the light polution will generate enough signal to stay in the positive range. Adding an adjustable extra offset is easy.

Can you send me a light frame and dark frame for testing?
What camera are you using?

>>Can I save this offset in the light sum file?
The -32 FITS format (float) should be able to store any value, also negative. If the singal is positive also the FITs 16 bit will do, else it will be clampped to zero if negative

Regards, Han

Serg1
Posts: 37
Joined: 30 Sep 2018, 05:14

Re: Black level

Post by Serg1 » 30 Sep 2018, 19:16

Han, I e-mailed the files.
Camera Skyrus453M-ICX453AQ.

han.k
Posts: 174
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Black level

Post by han.k » 30 Sep 2018, 19:40

Hello Serg,

I have created a special version of ASTAP, called astapX.exe. In this version you can set an offset in the menu tab STACK METHOD. Near stacking method. This version I added to the following file:

http://www.hnsky.org/astap.zip

Try this version.

I will check your files.

For my files, the dark average pixel is around 300. Taking a 50 seconds exposure increases the background to 1500 at sky with a SQM value of about 20.4. I don't understand why your images are different but let's investigate. Only thing I can could think of is that you have super dark skies which is good.

Regards, Han

Serg1
Posts: 37
Joined: 30 Sep 2018, 05:14

Re: Black level

Post by Serg1 » 30 Sep 2018, 19:57

This file is blue filter. The sky dark. The milky way is clearly visible.

han.k
Posts: 174
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Black level

Post by han.k » 30 Sep 2018, 20:11

Hello Serk,You files look normal to me. Gain is stable, temperature is equal. The only thing noticeable is that the light exposure didn't result in in a higher background.

Looking to my own H-alpha images, the signal level is after 200 seconds about 100 above the background. So result is positive.

So you have either super dark skies or the camera is drifting which is unlikely. Did you adjust any offset setting in the camera ASCOM driver?

Han

han.k
Posts: 174
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Black level

Post by han.k » 30 Sep 2018, 20:16

Serg1 wrote:
30 Sep 2018, 19:57
This file is blue filter. The sky dark. The milky way is clearly visible.
Okay. I looked to some other stack programs. Could not find any setting to set an offset for this problem. So how did they solved this?

Have you any experience with an other stacking program or an idea how they solved it? I could add a fixed value of 100, but with the value zero you could measure the background. So maybe the current solutionin astapX is fine. Only I like to have the minimal amount of settings.

As in previous post, did you change any setting in the ASCOM driver between making darks and lights?

Han

Serg1
Posts: 37
Joined: 30 Sep 2018, 05:14

Re: Black level

Post by Serg1 » 30 Sep 2018, 20:38

In Fitswork, you can change the black level on the histogram.
Setting in the ASCOM driver not change.
Attachments
2018-09-30_22-35-59.png
2018-09-30_22-35-59.png (8.72 KiB) Viewed 4995 times

Post Reply