sdss / lvmdrp

Local Volume Mapper (LVM) Data Reduction Pipeline
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

add comments to all header keys #77

Open havok2063 opened 2 months ago

havok2063 commented 2 months ago

Not all of the header keys in the downstream data products have comments. We should make sure all of the header keys have proper comments and those get propagated down into the downstream products. Comments will help us, and users, know what is what.

ymamay commented 2 months ago

In sky.py, function skymodel_pars_from_header the following could be changed to (adding in comments, hopefully with the right formatting, not sure about the format for the msolflux):

skymodel_pars = {
        f"HIERARCH SKYMODEL {telescope} SM_H": sm_h.to(u.km).value / observatory height in km,
        f"HIERARCH SKYMODEL {telescope} SM_HMIN": (2.0 * u.km).value / lower height limit in km,
        f"HIERARCH SKYMODEL {telescope} ALT": alt.to(u.deg).value / altitude of object above horizon [0,90] in deg,
        f"HIERARCH SKYMODEL {telescope} ALPHA": alpha.to(u.deg).value / separation of Sun and Moon as seen from Earth [0,360] (> 180 for waning Moon) in deg,
        f"HIERARCH SKYMODEL {telescope} RHO": rho.to(u.deg).value / separation of Moon and object [0,180] in deg,
        f"HIERARCH SKYMODEL {telescope} ALTMOON": altmoon.to(u.deg).value / altitude of Moon above horizon [-90,90] in deg,
        f"HIERARCH SKYMODEL {telescope} MOONDIST": moondist.value / distance to Moon (mean distance = 1; [0.91,1.08]),
        f"HIERARCH SKYMODEL {telescope} PRES": (744 * u.hPa).value / pressure at observer altitude in hPa,
        f"HIERARCH SKYMODEL {telescope} SSA": 0.97 / single scattering albedo for aerosols [0,1] ,
        f"HIERARCH SKYMODEL {telescope} CALCDS": "N" / calculation of double scattering of moonlight ("Y" or "N"),
        f"HIERARCH SKYMODEL {telescope} O2COLUMN": 1.0 / relative UV/optical ozone column density (1 -> 258 DU),
        f"HIERARCH SKYMODEL {telescope} MOONSCAL": 1.0 / scaling factor for scattered moonlight ,
        f"HIERARCH SKYMODEL {telescope} LON_ECL": lon_ecl.to(u.deg).value / heliocentric ecliptic longitude of object [-180,180] in deg,
        f"HIERARCH SKYMODEL {telescope} LAT_ECL": lat_ecl.to(u.deg).value / ecliptic latitude of object [-90,90] in deg,
        f"HIERARCH SKYMODEL {telescope} EMIS_STR": ",".join(map(str, [0.2])) / grey-body emissivity (comma-separated list starting with the first component in the light path),
        f"HIERARCH SKYMODEL {telescope} TEMP_STR": ",".join(map(str, [(290.0 * u.K).value])) / grey-body temperature in K (comma-separated list starting with the first component in the light path),
        f"HIERARCH SKYMODEL {telescope} MSOLFLUX": 130.0,  # 1 sfu = 1e-19 erg/s/cm**2/Hz /monthly-averaged solar radio flux [sfu] ,
        f"HIERARCH SKYMODEL {telescope} SEASON": season / bimonthly period (1: Dec/Jan, ..., 6: Oct/Nov.; 0: entire year),
        f"HIERARCH SKYMODEL {telescope} TIME": time / period of the night (x/3 of night, x = 1,2,3; 0: entire night),
    }

And this header keyword for the shadow height "HIERARCH GEOCORONAL {telescope} SHADOW_HEIGHT", the comment could be "height of Earth's shadow (in km)" and is added in skyMethod interpolate_sky (three times around line 1477)