Menu

Understanding calibration

Magnus L
2023-09-24
2023-09-30
  • Magnus L

    Magnus L - 2023-09-24

    Hi!

    Can you help me understand precisly how the calibration works in ASTAP? This is my issue:

    I have a raw image with a min value (according to PixInsight) of 8316.
    My master Dark have a min value of 5175

    My logic says that the calibrated image then should have a min value of 8316-5175=3141

    However, the min value of the calibrated image is zero (0). Which feels odd.

    Roughly the same applies if I use mean values - the resulting mean is almost 2000 lower than the difference btw the means of the raw and the dark. However, I assume the flat plays a role here too.

    So: why is the resulting min value zero in my calibrated images? It seems to not be a practical issue, I still can measure them, but I am curious.

    Magnus

     
  • han.k

    han.k - 2023-09-25

    Hi Magnus,

    That should not happen. Yes the calibrated file should have a value around 3141.

    Can you share a few lights, a master dark and master flat so I can have a detailed look what happens during calibration?

    Han

     
  • han.k

    han.k - 2023-09-25

    The value 3141 is the average background value after calibration. It is not impossible that a few pixels reach zero or below but not the average.

     
  • Magnus L

    Magnus L - 2023-09-30

    Hi!

    Here is a bunch of lights, calibrated lights, the master dark and the master flat used for this:

    https://www.dropbox.com/scl/fo/zcd0pb4ky0gjix2ygylkp/h?rlkey=gi7qfm2zkouyv0dqqxvmvccpk&dl=0

    The actual values differ from what I wrote above since these are other lights, but when I measure the calibrated lights in PixInsight, the min value is zero, and in AstroImageJ, it is a negative value.

    Looking forward to your thoughts on this!

    Magnus

     
  • han.k

    han.k - 2023-09-30

    The images look normal to me. PixInsight report the pixel value in range 0..1 and ASTAP in 0..65535.

    Light:
    PI : K=0.25 (25% saturation)
    ASTAP: 16000 (24.4% saturation)
    AstroImageJ: 16000 (24.4% saturation)

    Master dark (-32bit)
    PI : K=0.0007 (0.07% saturation)
    ASTAP: 5200 (8% saturation)
    AstroImageJ: 5200 (8% saturation)

    Calibrated light (-32 bit)
    PI : K=0.216 (21.6% saturation)
    ASTAP: 10200 (15.4% saturation)
    AstroImageJ: 10200 (15.4% saturation)

    MasterFlat (-32 bit)
    PI : K=0.987 (98.7 saturation"?)
    ASTAP: 36700 (56% saturation)
    AstroImageJ: 36700 (56% saturation)

    Above values are quick rough readings. But light(16000) - dark(5200) = light cal (10200) looks using the rough read values all normal.

    So Pi is reporting a really weird K value. If I Gaussian blur the master dark and flatten the hotpixel, PI report K=0.02.

    When I remove the dark label from the master dark, no change. Most surprising result do I get when I save the master dark as 16 bit. Then the K=0.08. So this PI "K" factor is weird. Probably it reports the image star fill factor???

    Changing in the header the gain from 20 to 1 doesn't do anything in PI

    Last, when I save the masterdark in PI, the pixel values drop according ASTAP to about 47. So about more then a factor 100 lower. AstroImageJ report pixel value 0.0007. If the file is saved again by ASTAP and keyword BZERO=0 and BSCALE=1 is added AstroImageJ reports also pixel value 47

    Ask in the PI forum why this is happening. This K value reported by PI is weird.

    Han

     
  • han.k

    han.k - 2023-09-30

    Okay, in PI, menu Edit, Readout options.

    Han

     

    Last edit: han.k 2023-09-30
  • han.k

    han.k - 2023-09-30

    My conclusion is that the conversion factor in PI for pixel values in floating point images is variable and most likely based on the image data . This is clearly shown by loading the master flat, master dark and applying Gaussian blur on the master dark.

    So measuring pixel value in a floating point F32/-32 bit images doesn't work in PI.

    This also result in the conclusion that in PI you can't properly combine 16 bit integer and 32 bit floating point images. To use the ASTAP masterdark, master flat and calibrated images you have to save them first as 16 bit to have a fixed conversion factor for the pixel values.

    Han

     
  • Magnus L

    Magnus L - 2023-09-30

    Hi!

    Thanks! So, there is nothing wrong with these files, right? The measurement value of zero is more an artefact of how PI handles 32 bit floating images, if I get it right. How about AstroImageJ, then? That one reports negative values.

    PI is really not much of an issue here for me, I just use it for measuring because it is easy :) I know that saving fits files in PI can mess things up for photometry, so I never use it for other than cosmetic pictures.

    Magnus

     
  • han.k

    han.k - 2023-09-30

    Nothing wrong with these files.

    I did not measure a negative value. Which file?

     
  • Magnus L

    Magnus L - 2023-09-30

    Hi!

    For instance the one ending in 105_cal. My Aij says "-13,154.0557" (running ubuntu linux)

    Magnus

     
  • han.k

    han.k - 2023-09-30

    The background is average around +10000. Only the histogram scale minimum is -13154 for some unknown reason. Most likely one hot pixel in the dark has a value of maybe +29000 (cosmic ray? ) and the hot pixel is missing in the light. Since calibration does the following:

    light(16000) - dark(29000) result in CalibratedLight (-13000).

    Nothing to worry about. Pixels of CMOS sensors are not perfect and can be effected by cosmic rays or other random effects. The bulk of the pixels is behaving fine.

    Han

     
  • Magnus L

    Magnus L - 2023-09-30

    Thanks! :)

    Magnus

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.