Author Topic: calibration question  (Read 4228 times)

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
calibration question
« on: 2017 December 22 15:48:55 »
A basic question...I may have this backwards...

My average master bias background =1200,
average master dark = 1400.

If I do a manual image calibration using master bias and master dark, but not checking calibrate (nor optimize) under master dark, I assume the bias is not subtracted from the dark. The light background being calibrated ends up approx. 3400 counts.  If I check calibrate under master dark, the light background value is approx. 4600 counts.

I thought the master bias was subtracted from the master dark during light frame calibration. Looks like the 1200 bias counts are added rather than subtracted in this process.

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: calibration question
« Reply #1 on: 2017 December 22 16:17:21 »
You don't mention flat frames, so I assume that you are not using flat frames. Furthermore I assume that you don't precalibrate the dark frame or the MasterDark (this is the preferred way).

There are two options:

Case 1 (no dark frame optimization):
You will not need bias frame (and MasterBias) at all. Uncheck both 'Calibrate' and 'Optimize' in the Master dark section of ImageCalibration.

Case 2 (with dark frame optimization):
You need a MasterBias. Check both 'Calibrate' and 'Optimize' in the Master dark section of ImageCalibration.

Bernd

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #2 on: 2017 December 22 16:45:50 »
Hi Bernd,

the flat frame is not relevant to my question and I did not pre-calibrate the master dark.

The question is, if I am subtracting the master bias from the master dark during light calibration, why does the final count of the light rise by the 1200 counts (the master bias value) rather than dropping by 1200 counts?

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: calibration question
« Reply #3 on: 2017 December 22 23:09:58 »
Quote from: tloebl
A basic question...I may have this backwards...

My average master bias background =1200,
average master dark = 1400.

If I do a manual image calibration using master bias and master dark, but not checking calibrate (nor optimize) under master dark, I assume the bias is not subtracted from the dark. The light background being calibrated ends up approx. 3400 counts.  If I check calibrate under master dark, the light background value is approx. 4600 counts.

I thought the master bias was subtracted from the master dark during light frame calibration. Looks like the 1200 bias counts are added rather than subtracted in this process.

Correct. Using the ImageCalibration process, the master dark and master bias are both subtracted from the light. When you check "calibrate" under master dark then the master bias is subtracted from the master dark before both are subtracted from the light.

So it's not the case that 1200 bias counts are added, it is more the case that what is being subtracted is reduced by 1200.  But it's mathematically the same thing whichever way you look at it!

Mark
« Last Edit: 2017 December 23 00:22:12 by sharkmelley »
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: calibration question
« Reply #4 on: 2017 December 23 03:44:03 »
When you read what I wrote, you will see that I answered your question correctly. I only mentioned flat frames because of the need of bias frames / MasterBias. Some people use MasterBias to calibrate their flat frames, some use a MasterFlat-Dark and some use the MasterDark with optimization for that purpose.

Case 1: You don't need MasterBias if you don't use dark frame optimization (exceptional case: if you calibrate your flat frames with the MasterBias). Uncheck 'Calibrate' and 'Optimize' in the Master dark section.
Code: [Select]
LightFrame - MasterDark

Case 2: You need MasterBias if you want to use dark frame optimization. Check both 'Calibrate' and 'Optimize' in the Master dark section.
Code: [Select]
(LightFrame - MasterBias) - k0 * (MasterDark - MasterBias)
Bernd

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #5 on: 2017 December 23 08:14:39 »
Appreciate the responses. I am familiar with the calibration procedure. It's really an arithmetic question. I am not using a master flat in order to simplify my question. I am using the master bias to illustrate the question.

If I don't subtract the 1200 count master bias from the master dark during light calibration, I get 3400 counts in the resulting calibrated light. If I do subtract the master bias from the master dark I get 4600.  I would expect the reverse.


Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: calibration question
« Reply #6 on: 2017 December 23 08:44:43 »
Quote from: tloebl
Appreciate the responses. I am familiar with the calibration procedure. It's really an arithmetic question. I am not using a master flat in order to simplify my question. I am using the master bias to illustrate the question.

If I don't subtract the 1200 count master bias from the master dark during light calibration, I get 3400 counts in the resulting calibrated light. If I do subtract the master bias from the master dark I get 4600.  I would expect the reverse.

Let me illustrate my earlier response with some example figures that give your results:
light: 6600
dark: 2000
bias: 1200

If you don't subtract the bias from the dark during calibration you get:
6600 - 2000 - 1200 = 3400

If you do subtract the bias from the dark during calibration you get:
6600 - (2000-1200) -1200 = 4600

Does that help clarify?

Mark
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: calibration question
« Reply #7 on: 2017 December 23 09:59:19 »
I am familiar with the calibration procedure.
It doesn't seem so for the PixInsight-specific ImageCalibration.


I'll comment Mark's numerical example in order to clarify:

Let me illustrate my earlier response with some example figures that give your results:
light: 6600
dark: 2000
bias: 1200

If you don't subtract the bias from the dark during calibration you get:
6600 - 2000 - 1200 = 3400
This is the result when you use MasterBias, but don't calibrate the MasterDark during calibration: You didn't precalibrate the MasterDark, so the bias is in the MasterDark. On the other hand you instructed PI to use MasterBias. So effectively you subtract bias twice and the result is WRONG.

If you do subtract the bias from the dark during calibration you get:
6600 - (2000-1200) -1200 = 4600
Bias is subtracted from the light frames and from the MasterDark as well. The result is correct - but it is absolutely unnecessary to use bias frames (and a MasterBias) at all, because the same result is yielded when you don't use MasterBias during the calibration but only calibrate the lights with the MasterDark (my Case 1 above).

My Case 2 (above) applies if you decide to use dark frame optimization.

In summary: not all of the possible combinations in ImageCalibration are reasonable, and some will even yield wrong results. You in person are responsible for the right process and suitable parameters. The old wisdom also applies here: "garbage in = garbage out".

Bernd


Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #8 on: 2017 December 23 13:04:05 »
Thanks to you both.  I should pre-calibrate the master darks and not use a master bias in the light calibration.

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #9 on: 2017 December 23 13:46:03 »
Bernd,

I notice if I use your recommended method 2 the standard deviation of the light is  lower but I  get many dark pixels throughout the image. Any idea what might cause this?

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: calibration question
« Reply #10 on: 2017 December 23 15:42:38 »
I should pre-calibrate the master darks and not use a master bias in the light calibration.
No, you shouldn't, this could result in clipping of pixels in the precalibrated MasterDark. It is better NOT to precalibrate the MasterDark.

Try the process that I described as Case 1:
- no precalibration of the MasterDark,
- use MasterDark, no MasterBias,
- in the Master dark section of ImageCalibration uncheck both 'Calibrate' and 'Optimize' options.

Then try Case 2:
- no precalibration of the MasterDark,
- use MasterDark and MasterBias,
- in the Master dark section of ImageCalibration check both 'Calibrate' and 'Optimize' options.

Compare, which process makes the better SNR.


I notice if I use your recommended method 2 the standard deviation of the light is  lower but I  get many dark pixels throughout the image. Any idea what might cause this?
Was that really with an uncalibrated MaserDark and settings that I recommended for Case 2? That's odd. Usually there remain some hot pixels after a light frame calibration WITH dark frame optimization, and these then have to be eliminated with CosmeticCorrection.

Anyway - you definitely want to avoid dark pixels after calibration. If light frame calibration without dark frame optimization results in better calibrated light frames, it is recommendable to use this process. It might depend on the camera, whether dark frame optimization is favorable or not.

Bernd

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #11 on: 2017 December 24 11:04:34 »
Thanks for the response Bernd. Good information.

I will experiment.

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #12 on: 2017 December 24 13:31:22 »
Bernd,

 If I apply method 2 to the subs, Image Calibration does not appear to work and the processed subs look identical to raw subs. It appears as if master dark and master flat are not applied.

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: calibration question
« Reply #13 on: 2017 December 24 23:13:55 »
Quote from: tloebl
Bernd,

 If I apply method 2 to the subs, Image Calibration does not appear to work and the processed subs look identical to raw subs. It appears as if master dark and master flat are not applied.

How many counts do you get in the light background?  I remember you obtained 3400 and 4600 using the approaches described in your original post.  Doing this should tell you if the processed subs really are identical to the raw subs.

Mark
« Last Edit: 2017 December 26 00:01:26 by sharkmelley »
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline tloebl

  • PixInsight Addict
  • ***
  • Posts: 137
Re: calibration question
« Reply #14 on: 2017 December 26 14:30:46 »
Mark,

There is indeed subtraction going on with Bernd's method 2 and in the final count the light is 1200 counts less than the raw image, but all of the hot pixels are still in the processed image.

Normal? Should I then run cosmetic correction to eliminate these hot pixels?