# 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.OBS.MODE    STR     OBS_MODE
	FPA.TIME	STR	DATE-OBS UTC-OBS	# Date and time
	FPA.EXPOSURE	STR	EXPTIME
	FPA.TEMP	STR	DETTEMP
	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
        FPA.LONGITUDE   F64     10.4170608521 # West Longitude in Hours 
        FPA.LATITUDE    F64     20.7070999146 # North Latitude in Degrees 
        FPA.ELEVATION   F32     3048.0 # altitude in meters
	CELL.SATURATION	F32	65535
	CELL.BAD	F32	0
	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	1024
	CELL.YSIZE	S32	1024
	CELL.XWINDOW	S32	0
	CELL.YWINDOW	S32	0
	CELL.GAIN	F32	1.0
	CELL.READNOISE	F32	10.0
END

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