Index: branches/eam_branches/ipp-20230313/ippconfig/Makefile.am
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/Makefile.am	(revision 42759)
+++ branches/eam_branches/ipp-20230313/ippconfig/Makefile.am	(revision 42820)
@@ -1,2 +1,4 @@
+TGT  = $(PSCONFDIR)/$(PSCONFIG)/etc/compress.mgc
+
 SUBDIRS = \
 	recipes \
@@ -36,5 +38,6 @@
 built_files = \
 	ipprc.config \
-	dvo.site
+	dvo.site \
+	$(TGT)
 
 installdir = $(datadir)/ippconfig
@@ -64,10 +67,4 @@
 
 
-TGTDIR  = $(PSCONFDIR)/$(PSCONFIG)/etc
-SRC	= 	compress
-TGT	= 	$(TGTDIR)/compress.mgc
-
-install: $(TGT)
-build:   $(MGC)
 
 if HAVE_LINUX
Index: branches/eam_branches/ipp-20230313/ippconfig/gpc1/ppImage.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/gpc1/ppImage.config	(revision 42759)
+++ branches/eam_branches/ipp-20230313/ippconfig/gpc1/ppImage.config	(revision 42820)
@@ -1139,4 +1139,30 @@
 END
 
+# CZW 2018-02-14
+# The default PPIMAGE_N includes BACKGROUND=T, and that breaks detrend construction
+PPIMAGE_N          METADATA
+  BASE.FITS        BOOL    TRUE            # Save base detrended image?
+  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
+  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
+  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
+  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
+  CHIP.VARIANCE.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
+  OVERSCAN         BOOL    FALSE           # Overscan subtraction
+  NONLIN           BOOL    FALSE           # Non-linearity correction; not implemented
+  BIAS             BOOL    FALSE           # Bias subtraction
+  DARK             BOOL    FALSE           # Dark subtraction
+  SHUTTER          BOOL    FALSE           # Shutter correction
+  FLAT             BOOL    FALSE           # Flat-field normalisation
+  MASK             BOOL    FALSE           # Mask bad pixels
+  MASK.BUILD       BOOL    FALSE           # Build internal mask?
+  FRINGE           BOOL    FALSE           # Fringe subtraction
+  PHOTOM           BOOL    FALSE           # Source identification and photometry
+  ASTROM.CHIP      BOOL    FALSE           # Astrometry per chip?
+  ASTROM.MOSAIC    BOOL    FALSE           # Astrometry for mosaic?
+  BIN1.FITS        BOOL    TRUE            # Save 1st binned chip image?
+  BIN2.FITS        BOOL    TRUE            # Save 2nd binned chip image?
+  BACKGROUND       BOOL    FALSE           # Subtract background?
+END
+
 # JPEG images for different types of residual images
 # Save JPEG from BIN1 for bias
Index: branches/eam_branches/ipp-20230313/ippconfig/recipes/psphot.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/recipes/psphot.config	(revision 42759)
+++ branches/eam_branches/ipp-20230313/ippconfig/recipes/psphot.config	(revision 42820)
@@ -107,4 +107,6 @@
 PSF_CLUMP_NY                        S32   1               # selecting PSF stars
 
+PSF_CLUMP_USE_CLIPPED_STATS         BOOL  TRUE            # define clump usig CLIPPED stats or ROBUST stats
+
 PSF_MIN_DS                          F32   0.01
 PSF_PARAM_WEIGHTS                   BOOL  FALSE
@@ -113,4 +115,6 @@
 LMM_FIT_GAIN_FACTOR_MODE            S32   0               # there are 3 options to determine the gain factor (0,1,2)
 LMM_FIT_USE_REWEIGHTING             BOOL  FALSE           # use IRLS-style reweighting (TRUE) or ordinary LMM
+
+PSF_FIT_STAR_COORDS                 BOOL  FALSE		  # if TRUE, fit position as well as shape for PSF stars
 
 PSF_FIT_ITER                        S32   50              # Maximum number of fitting iterations for PSF
Index: branches/eam_branches/ipp-20230313/ippconfig/simple/camera.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/simple/camera.config	(revision 42759)
+++ branches/eam_branches/ipp-20230313/ippconfig/simple/camera.config	(revision 42820)
@@ -42,4 +42,5 @@
 RECIPES		METADATA
         PPIMAGE         STR     simple/ppImage.config   # Default: all (normal) options on
+        PPMERGE         STR     simple/ppMerge.config   # Default: all (normal) options on
 	PSPHOT		STR	simple/psphot.config	# psphot details
 END
Index: branches/eam_branches/ipp-20230313/ippconfig/simple/format.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/simple/format.config	(revision 42759)
+++ branches/eam_branches/ipp-20230313/ippconfig/simple/format.config	(revision 42820)
@@ -20,11 +20,11 @@
 CELLS	METADATA
 	amplifier	METADATA
-		CELL.TRIMSEC.SOURCE	STR	VALUE
-		CELL.TRIMSEC		STR	[0:0,0:0]
+		# CELL.TRIMSEC.SOURCE	STR	VALUE
+		# CELL.TRIMSEC		STR	[0:0,0:0]
 		# alternatives for getting these from the headers
-		# CELL.TRIMSEC.SOURCE	STR	HEADER
-		# CELL.BIASSEC.SOURCE	STR	VALUE
-		# CELL.TRIMSEC		STR	DATASEC
-		# CELL.BIASSEC		STR	BIASSEC
+		CELL.TRIMSEC.SOURCE	STR	HEADER
+		CELL.BIASSEC.SOURCE	STR	HEADER
+		CELL.TRIMSEC		STR	DATASEC
+		CELL.BIASSEC		STR	BIASSEC
 	END
 END
Index: branches/eam_branches/ipp-20230313/ippconfig/simple/ppMerge.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/simple/ppMerge.config	(revision 42820)
+++ branches/eam_branches/ipp-20230313/ippconfig/simple/ppMerge.config	(revision 42820)
@@ -0,0 +1,2 @@
+
+# ROWS                S32     16             # Number of rows to read at once
Index: branches/eam_branches/ipp-20230313/ippconfig/simquad/camera.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/simquad/camera.config	(revision 42820)
+++ branches/eam_branches/ipp-20230313/ippconfig/simquad/camera.config	(revision 42820)
@@ -0,0 +1,75 @@
+# Camera configuration file for drop-dead boring camera, consisting of a single chip with single cell.
+
+# File formats that we know about
+FORMATS         METADATA
+	SIMPLE	   STR	simquad/format.config
+END
+
+# Description of camera --- all the chips and the cells that comprise them
+FPA     METADATA
+        Chip		STR	Cell00 Cell01 Cell10 Cell11
+END
+
+# move this elsewhere?  we need a lookup table to go from filter ID to abstract name
+FILTER.ID       METADATA
+	B	STR	B
+	V	STR	V
+	R	STR	R
+	I	STR	I
+	z	STR	z
+END
+
+# Table of strings to use for the class identifier (see ippdb) according to the file level.
+CLASSID		METADATA
+	FPA	STR	fpa
+	CHIP	STR	{CHIP.NAME}
+	CELL	STR	{CHIP.NAME}.{CELL.NAME}
+	fpa	STR	fpa
+	chip	STR	{CHIP.NAME}
+	cell	STR	{CHIP.NAME}.{CELL.NAME}
+END
+
+DVO.CAMERADIR	STR	megacam		# Camera directory for DVO
+
+# convert supplied FPA.OBSTYPE values to abstract exptype names
+OBSTYPE.TABLE METADATA
+  bias 	   STR BIAS
+  zero 	   STR BIAS
+  dark 	   STR DARK
+  flat 	   STR SKYFLAT
+  skyflat  STR SKYFLAT
+  domeflat STR DOMEFLAT
+  object   STR OBJECT
+  science  STR OBJECT
+END
+
+# Recipe options
+RECIPES		METADATA
+#        PPIMAGE         STR     simple/ppImage.config   # Default: all (normal) options on
+#	PSPHOT		STR	simple/psphot.config	# psphot details
+END
+
+PHOTCODE.RULE           STR     {DETECTOR}.{FILTER.ID}.{CHIP.NAME}	# Rule for generating photcode
+
+# reduction classes (recipes which are grouped together)
+REDUCTION	STR	recipes/reductionClasses.mdc
+
+FITSTYPES       STR     recipes/fitstypes.mdc
+
+FILERULES       STR     recipes/filerules-simple.mdc
+
+EXTNAME.RULES METADATA
+  CMF.HEAD STR hdr
+  CMF.DATA STR psf
+  CMF.XSRC STR xsrc
+  CMF.XRAD STR xrad
+  CMF.XFIT STR xfit
+  CMF.DETEFF STR deteff
+  CMF.XGAL STR xgal
+
+  PSF.HEAD  STR hdr
+  PSF.TABLE STR psf_model
+  PSF.RESID STR psf_resid
+END
+
+MASK.FORCE	BOOL	TRUE	# Force reliance on MASKS recipe if headers not present
Index: branches/eam_branches/ipp-20230313/ippconfig/simquad/format.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/simquad/format.config	(revision 42820)
+++ branches/eam_branches/ipp-20230313/ippconfig/simquad/format.config	(revision 42820)
@@ -0,0 +1,112 @@
+# Simulated camera with 4 readout amplifiers on a single chip
+
+# How to identify this type
+RULE	METADATA
+	TELESCOP	STR	SimScope
+	INSTRUME	STR	SIMQUAD
+END
+
+# How to read this data
+FILE	METADATA
+	PHU		STR	FPA	# The FITS file represents an entire FPA
+        EXTENSIONS      STR     CELL       # The extensions represent cells
+	FPA.OBS		STR	FILENAME	# A PHU keyword for unique identifier within the hierarchy level
+	CONTENT	        STR     CHIPNAME	# How to determine content of FITS file
+	CONTENT.RULE	STR	{CHIP.NAME}	# How to derive the CONTENT when writing
+END
+
+# What's in the FITS file?
+CONTENTS	METADATA
+	# File identifier with corresponding file layout name
+	Chip		STR	SimChip:SimCell:
+	Chip		STR	SimChip:SimCell:
+	Chip		STR	SimChip:SimCell:
+	Chip		STR	SimChip:SimCell:
+???
+	Cell00	STR	Cell00:SimCell
+	Cell01	STR	Cell01:SimCell
+	Cell10	STR	Cell10:SimCell
+	Cell11	STR	Cell11:SimCell
+END
+
+# Specify the layout
+CHIPS	METADATA
+	SimChip		METADATA
+		# Extension name, cellName:cellType
+		Cell00	STR	Cell00:SimCell
+		Cell01	STR	Cell01:SimCell
+		Cell10	STR	Cell10:SimCell
+		Cell11	STR	Cell11:SimCell
+	END
+END
+
+# Specify the cell data
+CELLS	METADATA
+	SimCell		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.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 TIME-OBS	# Date and time
+END
+
+# Default PS concepts that may be specified by value
+DEFAULTS	METADATA
+	CELL.XBIN	S32	1
+	CELL.YBIN	S32	1
+	FPA.TIMESYS	STR	UTC
+	FPA.RADECSYS	STR	ICRS
+	CELL.GAIN	F32	1.0
+	CELL.READNOISE	F32	2.0
+	CELL.BAD	F32	0
+	CELL.SATURATION	F32	65535
+#	CELL.BAD	F32	-65535
+	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.X0.DEPEND	STR	CELL.NAME
+	CELL.X0		METADATA
+		Cell00	S32	0
+		Cell01	S32	0
+		Cell10	S32	1024
+		Cell11	S32	1024
+	END
+	CELL.Y0.DEPEND	STR	CELL.NAME
+	CELL.Y0		METADATA
+		Cell00	S32	0
+		Cell01	S32	1024
+		Cell10	S32	0
+		Cell11	S32	1024
+	END
+	CELL.XSIZE	S32	1024
+	CELL.YSIZE	S32	1024
+END
+
+FORMATS		METADATA
+	FPA.RA		STR	HOURS
+	FPA.DEC		STR	DEGREES
+	FPA.TIME	STR	SEPARATE,YEAR.FIRST
+END
Index: branches/eam_branches/ipp-20230313/ippconfig/system.config
===================================================================
--- branches/eam_branches/ipp-20230313/ippconfig/system.config	(revision 42759)
+++ branches/eam_branches/ipp-20230313/ippconfig/system.config	(revision 42820)
@@ -23,5 +23,6 @@
 	SUPRIMECAM		STR	suprime/camera.config           # Subaru Suprimecam
 	SIMMOSAIC		STR	simmosaic/camera.config		# Simulated mosaic, for testing
-	SIMTEST			STR	simtest/camera.config		# Simulation test camera
+ 	SIMTEST			STR	simtest/camera.config		# Simulation test camera
+#       SIMQUAD			STR	simquad/camera.config		# Simulation test camera
 	SIMPLE			STR	simple/camera.config		# If all else fails....
 END
