# Pan-STARRS Imaging Sky Probe

# How to identify this type
RULE	METADATA
	SIMPLE		BOOL	TRUE
#	NAXIS		S32	2
	TELESCOP	STR	ISP-1 
	INSTRUME	STR	ISP-Apogee
	DETECTOR	STR	ISP-Apogee-01
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	SEQID	# 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.BIASSEC.SOURCE	STR	HEADER
		CELL.TRIMSEC		STR	TRIMSEC
		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.DETECTOR	STR	DETECTOR
	FPA.AIRMASS	STR	AIRMASS
	FPA.OBSTYPE	STR	OBSTYPE
	FPA.OBJECT	STR	OBSTYPE
	FPA.FILTERID	STR	FILTER
	FPA.FILTER	STR	FILTER
	FPA.POSANGLE	STR	ROTANGLE
	FPA.RA		STR	RA
	FPA.DEC		STR	DEC
	FPA.RADECSYS	STR	RADECSYS
#	FPA.FOCUS	STR	TELFOCUS
	FPA.TIME	STR	MJD-OBS
	FPA.TIMESYS	STR	TIMESYS
	FPA.ALT		STR	ALT
	FPA.AZ		STR	AZ
	FPA.TEMP	STR	CCDTEMP
	FPA.EXPOSURE	STR	EXPTIME
	CHIP.TEMP	STR	CCDTEMP
	CELL.EXPOSURE	STR	EXPTIME
	CELL.DARKTIME	STR	DARKTIME
	CELL.TIME	STR	MJD-OBS
	CELL.GAIN	STR	GAIN
	CELL.READNOISE	STR	RDNOISE
#	CELL.SATURATION	STR	SATURATE	### Currently set to 0 ???
#	CELL.TIMESYS	STR	TIMESYS
	CELL.XBIN	STR	CCDBIN1
	CELL.YBIN	STR	CCDBIN2
# these were used for some early data
#	CELL.XBIN	STR	XBIN
#	CELL.YBIN	STR	YBIN
	CELL.BAD	STR	BADLEVEL
END

# Default PS concepts that may be specified by value
DEFAULTS	METADATA
	CHIP.XSIZE	S32	2048
	CHIP.YSIZE	S32	2048
	CELL.XSIZE	S32	2048
	CELL.YSIZE	S32	2048
        FPA.LONGITUDE   STR     10:25:01.417 # West Longitude in Hours 10.4170608521
        FPA.LATITUDE    STR     20:42:25.558 # North Latitude in Degrees 20.7070999146
        FPA.ELEVATION   F32     3048.0 # altitude in meters
	FPA.TIMESYS	STR	UTC
	CELL.SATURATION	F32	60000
	CELL.READDIR	S32	1
	CELL.TIMESYS	STR	UTC
	CHIP.XPARITY	S32	1
	CHIP.YPARITY	S32	1
	CHIP.X0		S32	0
	CHIP.Y0		S32	0
	CELL.XPARITY	S32	1
	CELL.YPARITY	S32	1
	CELL.X0		S32	0
	CELL.Y0		S32	0
#	CELL.XBIN	S32	1
#	CELL.YBIN	S32	1
END

FORMATS		METADATA
	FPA.RA		STR	DEGREES
	FPA.DEC		STR	DEGREES
	FPA.TIME	STR	MJD
	CELL.TIME	STR	MJD
END

# PS Concepts to get from the database
DATABASE	METADATA
# None.
END
