Index: /trunk/ippconfig/sdssmosaic/format_mef.config
===================================================================
--- /trunk/ippconfig/sdssmosaic/format_mef.config	(revision 19025)
+++ /trunk/ippconfig/sdssmosaic/format_mef.config	(revision 19025)
@@ -0,0 +1,140 @@
+# SDSSmosaic camera, starting from SDSS from Pan-STARRS Imaging Sky Probe
+# Sebastian Jester jester at mpia.de August 7, 2007
+
+# How to identify this type
+RULE	METADATA
+	SIMPLE		BOOL	TRUE
+	ORIGIN		STR	SDSS
+	TELESCOP	STR	2.5m
+	PSFORMAT	STR	MEF
+END
+
+# How to read this data
+FILE	METADATA
+	PHU		STR	FPA
+	EXTENSIONS	STR	CHIP
+	FPA.OBS		STR	FRAME	# A PHU keyword for unique identifier within 
+					# the hierarchy level - just needs to be the same
+					# for all 6 files belonging to the same "exposure"
+END
+
+# What's in the FITS file?
+CONTENTS	METADATA
+	# Chips name, chipType
+	chip1		STR	CHIP1:Chip
+	chip2		STR	CHIP2:Chip
+	chip3		STR	CHIP3:Chip
+	chip4		STR	CHIP4:Chip
+	chip5		STR	CHIP5:Chip
+	chip6		STR	CHIP6:Chip
+END
+	
+# Specify the chips
+CHIPS		METADATA
+	# Chip type, cellName:cellType
+	Chip	STR	Cell:Cell
+END
+
+
+# Specify the cell data
+CELLS	METADATA
+	Cell	METADATA
+#		CELL.TRIMSEC.SOURCE	STR	HEADER
+#		CELL.TRIMSEC		STR	TRIMSEC
+		CELL.TRIMSEC.SOURCE	STR	VALUE
+		CELL.TRIMSEC		STR	[1:2048,1:1361]
+#		CELL.BIASSEC.SOURCE	STR	HEADER
+#		CELL.BIASSEC		STR	BIASSEC
+	END
+END
+# NB: If we could look up the gains etc. separately for both amplifiers,
+# we could split the chips into cells for each amp
+
+# How to translate PS concepts into FITS headers
+TRANSLATION	METADATA
+	FPA.TELESCOPE	STR	TELESCOP
+# FPA.INSTRUMENT actually needs to be identical to the CAMERA, 
+# so I'm moving it from here down to the defaults to make sure that
+# this is ture
+#	FPA.INSTRUMENT	STR	ORIGIN
+	FPA.DETECTOR	STR	CCDLOC
+#	FPA.AIRMASS	STR	AIRMASS
+	FPA.OBSTYPE	STR	FLAVOR
+	FPA.OBJECT	STR	OBJECT
+	FPA.FILTERID	STR	FILTER
+	FPA.FILTER	STR	FILTER
+	FPA.POSANGLE	STR	IPA
+	FPA.RA		STR	RA
+	FPA.DEC		STR	DEC
+	FPA.RADECSYS	STR	RADECSYS
+#	FPA.FOCUS	STR	TELFOCUS
+	FPA.TIME    	STR     DATE-OBS TAIHMS # Two values are interpreted as date and time
+	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	EXPTIME
+	CELL.TIME	STR	DATE-OBS TAIHMS
+#	CELL.GAIN	STR	GAIN
+#	CELL.READNOISE	STR	RDNOISE
+#	CELL.SATURATION	STR	SATURATE	### Currently set to 0 ???
+#	CELL.TIMESYS	STR	TIMESYS
+	CELL.XBIN	STR	COLBIN
+	CELL.YBIN	STR	ROWBIN
+# 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
+# FPA.CAMERA contains the name of the camera according to the config system (i.e. SDSSmosaic)
+# FPA.INSTRUMENT contains the name of the camera according to the fits headers (i.e. itself)
+# Normally, this will be in the header keyword INSTRUME but for this one, we override it to 
+# SDSSmosaic to avoid confusion between this and the non-mosaic SDSS configuration.
+	INSTRUME	STR	SDSSmosaic
+	FPA.INSTRUMENT	STR	INSTRUME
+# The gain is only roughly correct...
+	CELL.GAIN	F32	5.0
+# readnoise is from http://www.sdss.org/dr6/instruments/imager/index.html
+# Note that I have emails from Jim Gunn saying dark noise *is* important...
+	CELL.READNOISE	F32	5.0
+	FPA.AIRMASS	F32	1.3
+	CHIP.XSIZE	S32	2048
+	CHIP.YSIZE	S32	1361
+	CELL.XSIZE	S32	2048
+	CELL.YSIZE	S32	1361
+#	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     SEPARATE YEAR.FIRST
+#	FPA.TIME	STR	MJD
+	CELL.TIME    	STR     SEPARATE YEAR.FIRST
+#	CELL.TIME	STR	MJD
+	CHIP.NUM	STR	FORTRAN
+END
+
+# PS Concepts to get from the database
+DATABASE	METADATA
+# None.
+END
