# Simulation test camera with single chip with single cell

# How to identify this type
RULE	METADATA
	INSTRUME	STR	SIMTEST
	TELESCOP	STR	SimScope
#	NAXIS		S32	2
END

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

# What's in the FITS file?
CONTENTS	STR	Chip:Cell:amplifier

# Specify the cell data
CELLS	METADATA
	amplifier	METADATA
		CELL.TRIMSEC.SOURCE	STR	HEADER
		CELL.TRIMSEC		STR	TRIMSEC
		CELL.BIASSEC.SOURCE	STR	HEADER
		CELL.BIASSEC		STR	BIASSEC
	END
END

# How to translate PS concepts into FITS headers
TRANSLATION	METADATA
	FPA.TELESCOPE	STR	TELESCOP
	FPA.INSTRUMENT	STR	INSTRUME
	FPA.OBSTYPE	STR	OBSTYPE
	FPA.AIRMASS	STR	AIRMASS
        FPA.FILTERID    STR     FILTER
	FPA.FILTER	STR	FILTER
	FPA.POSANGLE	STR	POSANGLE
	FPA.RA		STR	RA
	FPA.DEC		STR	DEC
	FPA.OBJECT	STR	OBJECT
	FPA.TIME	STR	DATE-OBS UTC-OBS	# Date and time
	FPA.EXPOSURE	STR	EXPTIME
	CELL.EXPOSURE	STR	EXPTIME
	CELL.DARKTIME	STR	DARKTIME
	CELL.TIME	STR	DATE-OBS UTC-OBS	# Date and time
	CELL.XBIN	STR	XBIN
	CELL.YBIN	STR	YBIN
END

# Default PS concepts that may be specified by value
DEFAULTS	METADATA
	FPA.TIMESYS	STR	UTC
	FPA.RADECSYS	STR	ICRS
	FPA.DETECTOR	STR	SIMTEST
	CELL.SATURATION	F32	65535
	CELL.BAD	F32	-100 ## XXX this value is bogus, but needs to be context based so residual images do not get half-masked
	CELL.READDIR	S32	1
	CELL.TIMESYS	STR	UTC
	CELL.XPARITY	S32	1
	CELL.YPARITY	S32	1
	CHIP.XPARITY	S32	1
	CHIP.YPARITY	S32	1
	CELL.X0		S32	0
	CELL.Y0		S32	0
	CELL.XSIZE	S32	2048
	CELL.YSIZE	S32	2048
	CELL.XWINDOW	S32	0
	CELL.YWINDOW	S32	0
	CELL.GAIN	F32	1.0
	CELL.READNOISE	F32	10.0
END

FORMATS		METADATA
	FPA.RA		STR	HOURS
	FPA.DEC		STR	DEGREES
	FPA.TIME	STR	SEPARATE,YEAR.FIRST
	CELL.TIME	STR	SEPARATE,YEAR.FIRST
END
