# The Low Resolution Imager and Spectrograph (LRIS) blue side

# How to identify this type
RULE	METADATA
	TELESCOP	STR	Keck I
	INSTRUME	STR	LRISBLUE
	FORMAT		STR	MEF
END

# How to read this data
FILE	METADATA
	PHU		STR	FPA	# The FITS file represents an entire FPA
	EXTENSIONS	STR	CHIP	# There are no extensions
	FPA.OBS		STR	OBSNUM	# A PHU keyword for unique identifier within the hierarchy level
END

# What's in the FITS file?
CONTENTS	METADATA
	ccd1	STR	LeftChip:LeftAmp:left LeftChip:RightAmp:right
	ccd2	STR	RightChip:LeftAmp:left RightChip:RightAmp:right
END

# Specify the cell data
CELLS	METADATA
	left		METADATA
		CELL.BIASSEC.SOURCE	STR	HEADER
		CELL.TRIMSEC.SOURCE	STR	HEADER
		CELL.GAIN.SOURCE	STR	HEADER
		CELL.BIASSEC		STR	BSECL1 BSECL2
		CELL.TRIMSEC		STR	TSECL
		CELL.GAIN		STR	GAINL
		CELL.X0			S32	0
	END

	right	METADATA
		CELL.BIASSEC.SOURCE	STR	HEADER
		CELL.TRIMSEC.SOURCE	STR	HEADER
		CELL.GAIN.SOURCE	STR	HEADER
		CELL.BIASSEC		STR	BSECR1 BSECR2
		CELL.TRIMSEC		STR	TSECR
		CELL.GAIN		STR	GAINR
		CELL.X0			S32	1024
	END
END

# How to translate PS concepts into FITS headers
TRANSLATION	METADATA
	FPA.AIRMASS		STR	AIRMASS
	FPA.FILTER		STR	BLUFILT
	FPA.POSANGLE		STR	ROTPOSN
	FPA.RA			STR	RA
	FPA.DEC			STR	DEC
	CELL.EXPOSURE		STR	EXPOSURE
	CELL.DARKTIME		STR	EXPOSURE	# No special darktime header; use exposure time
	CELL.TIME		STR	MJD-OBS
	CELL.XBIN		STR	CCDSUM
	CELL.YBIN		STR	CCDSUM
END

# Default PS concepts that may be specified by value
DEFAULTS	METADATA
	FPA.RADECSYS		STR	ICRS
	CELL.TIMESYS		STR	UTC
	CELL.READDIR		S32	1
	CELL.XPARITY		S32	1
	CELL.YPARITY		S32	1
	CELL.Y0			S32	0
	CELL.READNOISE		F32	2.5
	CELL.SATURATION		F32	65536
	CELL.BAD		F32	0
END


# Where there might be some ambiguity, specify the format
FORMATS		METADATA
	FPA.RA		STR	HOURS
	FPA.DEC		STR	DEGREES
	CELL.TIME	STR	MJD
END
