EGAIN field is in the wrong units

Issue #159 resolved
Linda Thomas-Fowler created an issue

This is against v1.8 but the version dropdown won't let me enter 1.8.

  1. Save a dark or bias frame in XISF format in NINA.
  2. Open that file in PixInsight.
  3. Use the FITSHeader process to inspect that file.
  4. Note that EGAIN is in ZWO (my camera manufacturer's gain format; e.g. 75) when it should be in e/ADU.

Expected behavior: 1. EGAIN should be in e/ADU 2. GAIN (which does not exist in the file) should be in camera-specific gain units (e.g. 75).

Comments (6)

  1. Stanley Dimant

    @daleghent do you see a way to get e/ADU gain? I don't think the APIs provide those values, or at least I haven't seen such.

  2. Linda Thomas-Fowler reporter

    I’m not really sure. SGP provides both GAIN and EGAIN as metadata though in investigations this, the EGAIN value looks wrong so I’m not sure where they are coming up with it. Perhaps NINA should just supply GAIN and not EGAIN.

    typos courtesy of iPad

  3. Dale Ghent

    I've looked into this. We definitely need to change EGAIN to GAIN with the units it uses now (which can vary in meaning from manufacturer to manufacturer.) ASCOM does have ADU-related properties in the Camera class: ElectronsPerADU and MaxADU. I think inside the ASCOM drivers the manufacturer has a table for each camera model or something like that - info we don't know about and can't access when driving the camera natively unless the SDK provides this information.

    For now we should change the EGAIN keyword to GAIN. How we come up with ADU-based units for a given camera outside of ASCOM is a more complicated exercise.

  4. Dale Ghent

    If the camera SDK or ASCOM Camera class provides an ElectronsPerADU property, we'll observe that and use it for the EGAIN keyword value, with GAIN reflecting the actual camera gain setting. Here are two examples, the first using the ZWO ASI SDK which does provide per-camera e-/ADU values, and ASCOM simulator, which has an ElectronsPerADU property. Does this look reasonable?

    PixInsight_2019-04-13_03-08-23.png PixInsight_2019-04-13_03-10-17.png

  5. Log in to comment