fitsmgmt.header.midtime_obs

fitsmgmt.header.midtime_obs(
    header=None,
    dateobs='DATE-OBS',
    format=None,
    scale=None,
    precision=None,
    in_subfmt=None,
    out_subfmt=None,
    location=None,
    exptime='EXPTIME',
    exptime_unit=u.s,
)

Calculate the mid-observation time.

Parameters

header : ~astropy.io.fits.Header, optional. = None

The header to extract the value. midtime_obs can be used without header. But to do so, dateobs must be in ~astropy.time.Time and exptime must be given as float or ~astropy.units.Quantity. Default: None.

dateobs : str or ~astropy.time.Time, optional. = 'DATE-OBS'

The header keyword for DATE-OBS (start of exposure) or the ~astropy.Time object. Default: 'DATE-OBS'.

exptime : str, float, ~astropy.units.Quantity, optional. = 'EXPTIME'

The header keyword for exposure time or the exposure time as float (in seconds) or ~astropy.units.Quantity. Default: 'EXPTIME'.

format : optional = None

Passed to ~astropy.time.Time when dateobs is read from the header.

scale : optional = None

Passed to ~astropy.time.Time when dateobs is read from the header.

precision : optional = None

Passed to ~astropy.time.Time when dateobs is read from the header.

in_subfmt : optional = None

Passed to ~astropy.time.Time when dateobs is read from the header.

out_subfmt : optional = None

Passed to ~astropy.time.Time when dateobs is read from the header.

location : optional = None

Passed to ~astropy.time.Time when dateobs is read from the header.

exptime_unit : ~astropy.units.Unit = u.s

Unit applied to numeric exposure times. Default is seconds.