Simmosaic Simtest Notes

setup:
------------------
in pantasks:
$SIMTEST_CAMERA = SIMMOSAIC

image injection error:
-------------------
edit ippconfig/simmosaic/ppImage.config
->remove line APPLY.TILTYSTREAK

TIME errors reported during image injection
------------------
edit ippconfig/simmosaic/format_split.config
edit ippconfig/simmosaic/format_together.config
->in ~/simmosaic/fix-files

output format error:
-------------------
edit ippconfig/simmosaic/filerules-*
->in ~/simmosaic/fix-files/filerules

ppImage error in detrend_resid_exp.pl:
-------------------
"failed to find class ID fpa in normalization table"
edit ippconfig/simmosaic/ppImage.config
NORM.CLASS              STR     CHIP             # How to find the per-class normalizations
edit line 13
-> in fix-files/ppImage.config

edit ippconfig/simmosaic/ppImage.config
MASK             BOOL    FALSE	# Mask bad pixels
->in ~/simmosaic/fix-files

ppImage seg fault:
---------------------
ipp/psModules/src/detrend/pmShutterCorrection.c
breaks in pmShutterCorrectionGuess at line:
    // fit a line and extrapolate the fit to counts = A (1 + dTk/dTo) : exptime = dTo
    if (!psVectorFitPolynomial1D (line, NULL, 0, tmpY, NULL, tmpX)) {
        printf("Unable to fit for the reference offset.\n");
        printf("tmpX0: %f, tmpX1: %f, tmpY0: %f, tmpY1: %f\n", tmpX->data.F32[0], tmpX->data.F32[1], tmpY->data.F32[0], tmpY->data.F32[1]);
        goto GUESS_ERROR;
    }
see ~/simmosaic/baz.Chip10.log generated by 
detrend_stack.pl --threads @MAX_THREADS@ --det_id 3 --iteration 0 --class_id Chip10 --det_type SHUTTER --camera SIMMOSAIC --outroot file:///netdisks/panstarrs/giebink/simmosaic/baz --redirect-output --dbname simtest_mosaic --verbose --save-temps

/netdisks/panstarrs/giebink/psconfig/default.lin64/bin/ppMerge .toad.Chip10.list file:///netdisks/panstarrs/giebink/simmosaic/toad -recipe PPMERGE PPMERGE_SHUTTER -type SHUTTER -stats file:///netdisks/panstarrs/giebink/simmosaic/toad.Chip10.stats -recipe PPSTATS DARKSTATS -tracedest file:///netdisks/panstarrs/giebink/simmosaic/toad.Chip10.trace -log file:///netdisks/panstarrs/giebink/simmosaic/toad.Chip10.log -dbname simtest_mosaic -threads @MAX_THREADS@

Unable to fit for the reference offset.
tmpX0: 0.977549, tmpX1: 0.977389, tmpY0: 10.000000, tmpY1: 20.000000

added workaround to: 
ipp/psModules/src/detrend/pmShutterCorrection.c
line 195:
//    psFree(corr);
//    return NULL;
    corr->scale = 0.5;
    corr->offset = 0.5;
    corr->offref = 0.5;

psastro error in camera_exp.pl:
--------------------
photcode r not found in photcode table
cp simtest/psastro.config simmosaic/psastro.config
->Had to remove:
PSASTRO.GRID.OFFSET    F32    500.
PSASTRO.GRID.SCALE     F32     50.
->in ~/simmosaic/fix-files
->not sure how much has be put in the file

addstar error in cam_exp.pl:
--------------------
missing MJD Keyword MJD-OBS
->cp simtest/dvo.config simmosaic/dvo.config

psastro error:
---------------------
ipp/psModules/src/astrom/pmAstrometryObjects.c
programming error for: camera_exp.pl --exp_tag simtest.005.001.Chip00.74 --cam_id 16 --camera SIMMOSAIC --outroot /data/ipp002.0/simmosaic/cam/cam --redirect-output --run-state new --dvodb /data/ipp002.0/simmosaic/DVO --dbname simtest_mosaic --verbose
edit pantasks/modules/simtest.basic.config
to set all object exposures to 240s
also, edit simmosaic/psastro.config
PSASTRO.PIXEL.SCALE    F32  1.0
->in ~/simmosaic/file-fix

psastro/ppStack error:
--------------------
ipp/psLib/src/fits/psFits.c
 -> p_psFitsError (psFits.c:74): I/O error
      Could not find HDU with EXTNAME = 'MATCHED_REFS'
According to Paul, this should be ignored.
