Notes on creating/copying configuration files and adding a new camera config. Created for IPP 2.2, likely to be outdated in many ways by now that we are at 2.6.1. Started by Sebastian Jester (jester at mpia.de)

Also see Debugging configuration errors

Hot news in 2.6.1

psastro insists on having a MEF format config file defined, because that's what it uses for its outputs. Thus, even if your camera's data natively come in the SPLIT format (with different chips in different fits files), you need a format_mef.config file (with different chips in different extensions of the same file). Here's a Format_mef.diff.txt between my SDSSmosaic/format.config (the original, SPLIT-format file) and the format_mef.config that Paul kindly "invented" for me, which seems to make things work. If your camera is SPLIT format, use the diff as a guide for how to make a MEF config file. You then need to point to both the SPLIT and the MEF files in your camera's camera.config in a section like this one:

# File formats that we know about FORMATS METADATA

MEF STR sdssmosaic/format_mef.config

SPLIT STR sdssmosaic/format.config

END

Note that the order is relevant - MEF needs to come first.

Initializing

First, make sure there's a ~/.ptolemyrc (for Ohana [?]) and ~/.ipprc (for everything outside Ohana) config file (follow the links for my versions from IfA). The following commands copy the default versions to your home directory, create an ippconfig directory where you can edit the config files and create new ones for new cameras, and set you up with the default camera config files etc. (assuming you are using ipp-2.2 on a 64-bit linux machine):

mkdir ~/ippconfig cp -r $PSCONFDIR/ipp-2.2.lin64/share/ippconfig/* ~/ippconfig cd ~/ippconfig cp dvo.site ~/.ptolemyrc cp ipprc.config ~/.ipprc

Then point at this directory in the .ipprc file, with

PATH STR /home/panstarrs/jester/ippconfig

There's a similar entry in ~/.ptolemyrc:

CONFDIR /home/panstarrs/jester/ippconfig

Should the config files be ipp version-dependent? What's the mechanism to point to different dvo databases, e.g. one for MDS and one for 3pi?

New camera config for the SDSS

Since SDSS produces one file per chip and every chip has its own filter, I start with a copy of the ISP config files since they're for a single chip, too:

cp -r ~/ippconfig/isp ~/ippconfig/sdss

Then specify that the camera 'SDSS' is described in the sdss directory, and specify the dvo camera name (?) in ~/.ipprc:

### Setups for each camera system CAMERAS METADATA

SDSS STR sdss/camera.config

END

### camera names as expected by DVO DVO.CAMERAS METADATA

SDSS STR sdss

END

Then you need to edit a number of files in the sdss directory.

format.config

This tells ipp how to recognize that a given fits file is from SDSS, e.g. by looking for certain header keywords:

# How to identify this type RULE METADATA

SIMPLE BOOL TRUE

# NAXIS S32 2

ORIGIN STR SDSS TELESCOP STR 2.5m

END

In the CELLS section you can specify that only a subsection of the frame should be used, which is useful for SDSS images since they have the following image's first 64 rows tacked on at the end:

# Specify the cell data CELLS METADATA

CELL.TRIMSEC STR [1:2048,1:1361]

END

Maybe this needs to run from 0:2047 etc...

It also contains the detailed description of how fits header keywords are read by IPP. If something is in the header, specify the relevant header keyword in the TRANSLATION section. If some numbers are fixed, put them in the DEFAULTS section.

For SDSS, the gain (e.g.) needs to be read from a different file, but with a predictable name. Could external file reference be incorporated?

camera.config

Here you mostly only need to replace 'isp' by 'sdss', and modify some things which tell ipp what the header keywords for dates are, e.g.:

FPA.TIME STR TAI

and list the allowed filters for this camera

# valid filter names and corresponding IDs FILTER.ID METADATA

g STR g r STR r i STR i z STR z u STR u

END

ppImage.config

Here you tell IPP how to construct a photcode for the filter/chip combination from the camera, filter and chip ID:

PHOTCODE.RULE STR SDSS.{FILTER.ID}.{DETECTOR}

FILTER.ID is from the list in camera.config, and DETECTOR specifies which individual detector there is (in the SDSS camera, each chip has its own fixed filter, so there are 5 filters x 6 camera columns = 30 photcodes).

The detector keyword is from the header keyword CCDLOC which in fact already uniquely specifies the system:

CCDLOC = 25

means ccd 2 in camcol 5. The filters are fixed to the CCDs in the following order:

1 r 2 i 3 u 4 z 5 g

Remember that Robert is under ze Gunn! I.e., ccd 2 implies filter i. The photcodes are more human-readable with the filter name in there, so that's the reason for the redundancy.

dvo.config

CATDIR is the directory where dvo catalogs are kept. Point this to somewhere where you can write:

CATDIR /data/ipp001.0/jester/stripe82/coadd/catdir

Also edit the entries for the header keywords that specify things like observing date, e.g.

MJD-KEYWORD NONE DATE-KEYWORD DATE-OBS DATE-MODE YYYY-MM-DD UT-KEYWORD TAIHMS