def get_exptime(header):
    """Tries a couple of keywords to find the exposure time in a FITS header"""
    for exptime_key in ("EXPTIME", "LEXPTIME", "SEXPTIME"):
        if exptime_key in header:
            exptime = float(header[exptime_key])
            return exptime