IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39926 for trunk/psastro/src


Ignore:
Timestamp:
Jan 6, 2017, 11:30:10 AM (10 years ago)
Author:
eugene
Message:

merging changes from czw dev branch (compare with r39924)

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psastro/src/psastro.h

    r38040 r39926  
    7070bool              psastroCorrectKH (pmConfig *config, pmFPAview *view, pmReadout *readout, psMetadata *recipe, psArray *inStars);
    7171
    72 psArray          *pmSourceToAstromObj (psArray *sources);
     72psArray          *pmSourceToAstromObj (psArray *sources, float MagOffset);
    7373bool              psastroAstromGuess (int *nStars, pmConfig *config);
    7474bool              psastroAstromGuessCheck (pmConfig *config);
  • trunk/psastro/src/psastroAstromGuess.c

    r31333 r39926  
    7575    pmFPA *fpa = input->fpa;
    7676
    77     if (DEBUG) psastroDumpCorners ("corners.up.guess1.dat", "corners.dn.guess1.dat", fpa);
     77    // this call only works if we have loaded a model : seg fault if not
     78    if (DEBUG && useModel) psastroDumpCorners ("corners.up.guess1.dat", "corners.dn.guess1.dat", fpa);
    7879
    7980    // load mosaic-level astrometry?
     
    9192            if (!psastroAstromGuessSetChip (fpa, chip, view, pixelScale, bilevelAstrometry)) continue;
    9293        }
     94
     95        if (!chip->toFPA || !chip->fromFPA) {
     96          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     97          fprintf (stderr, "no astrom model for %s, skipping\n", name);
     98          continue;
     99        }
    93100
    94101        if (newFPA) {
     
    312319    while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) {
    313320        if (!chip->process || !chip->file_exists || !chip->data_exists) { continue; }
     321
     322        if (!chip->toFPA || !chip->fromFPA) {
     323          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     324          fprintf (stderr, "no astrom model for %s, skipping\n", name);
     325          continue;
     326        }
    314327
    315328        // XXX we are currently inconsistent with marking the good vs the bad data
  • trunk/psastro/src/psastroChipAstrom.c

    r36914 r39926  
    8585                  for (int nn = 0; nn < refstars->n; nn++) {
    8686                    pmAstromObj *ref = refstars->data[nn];
    87                     fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf  %lf %lf\n",
     87                    fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf  %lf %lf : %f %f\n",
    8888                             ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD,
    8989                             ref->TP->x, ref->TP->y,
    9090                             ref->FP->x, ref->FP->y,
    91                              ref->chip->x, ref->chip->y);
     91                             ref->chip->x, ref->chip->y, ref->Mag, ref->magCal);
    9292                  }
    9393                  fclose (outfile);
     
    101101                  for (int nn = 0; nn < gridrawstars->n; nn++) {
    102102                    pmAstromObj *ref = gridrawstars->data[nn];
    103                     fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf  %lf %lf\n",
     103                    fprintf (outfile, "%lf %lf  %lf %lf  %lf %lf  %lf %lf : %f %f\n",
    104104                             ref->sky->r*PS_DEG_RAD, ref->sky->d*PS_DEG_RAD,
    105105                             ref->TP->x, ref->TP->y,
    106106                             ref->FP->x, ref->FP->y,
    107                              ref->chip->x, ref->chip->y);
     107                             ref->chip->x, ref->chip->y, ref->Mag, ref->magCal);
    108108                  }
    109109                  fclose (outfile);
  • trunk/psastro/src/psastroConvert.c

    r38040 r39926  
    5151    bool status;
    5252
     53    // XXX I want to make this optional
     54    float MagOffset = 0.0;
     55    if (1) {
     56      // select the input data sources
     57      pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT");
     58      if (!input) {
     59        psError(PSASTRO_ERR_CONFIG, true, "failed to find PSASTRO.INPUT\n");
     60        return false;
     61      }
     62      pmFPA *fpa = input->fpa;
     63
     64      float zeropt, exptime;
     65
     66      // really error-out here?  or just skip?
     67      if (!psastroZeroPointFromRecipe (&zeropt, &exptime, NULL, fpa, recipe)) {
     68        psLogMsg ("psastro", PS_LOG_INFO, "failed to load zeropt data from recipe");
     69        zeropt = 0.0;
     70        exptime = 1.0;
     71      }
     72
     73      // recipe values are given in instrumental magnitudes
     74      // use the zero point and exposure time to convert to apparent mags: M_ap = M_inst + C_0 + 2.5*log(exptime)
     75      MagOffset = zeropt + 2.5*log10(exptime);
     76    }
     77
    5378    // PSPHOT.SOURCES carries the pmSource objects (from psphot analysis or loaded externally)
    5479    pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
     
    5984
    6085    // convert the pmSource objects into pmAstromObj objects (drop !STAR and SATSTAR?)
    61     psArray *inStars = pmSourceToAstromObj (sources);
     86    psArray *inStars = pmSourceToAstromObj (sources, MagOffset);
    6287
    6388    // apply Koppenhoefer correction if needed
     
    175200
    176201// select a magnitude range?
    177 psArray *pmSourceToAstromObj (psArray *sources) {
     202psArray *pmSourceToAstromObj (psArray *sources, float MagOffset) {
    178203
    179204    psArray *objects = psArrayAllocEmpty (sources->n);
     
    211236        obj->dMag = source->psfMagErr;
    212237        obj->SBinst = source->psfMag + 5.0*log10(axes.major);
     238        obj->magCal = obj->Mag + MagOffset;
    213239
    214240        // XXX do we have the information giving the readout and cell offset?
  • trunk/psastro/src/psastroDemoDump.c

    r26259 r39926  
    234234        if (!chip->process || !chip->file_exists || !chip->data_exists) { continue; }
    235235
     236        if (!chip->toFPA || !chip->fromFPA) {
     237          char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
     238          fprintf (stderr, "no astrom model for %s, skipping\n", name);
     239          continue;
     240        }
     241
    236242        // XXX write out the four corners for a test
    237243        psRegion *region = pmChipPixels (chip);
  • trunk/psastro/src/psastroFixChips.c

    r27639 r39926  
    306306        psRegion *region = pmChipPixels (obsChip);
    307307        obsChip->toFPA   = toFPA;
     308        // NOTE: when we call psPlaneTransformInvert here, we do not increase the order as in other places
    308309        obsChip->fromFPA = psPlaneTransformInvert(NULL, obsChip->toFPA, *region, 50);
    309310        psFree (region);
  • trunk/psastro/src/psastroLoadRefstars.c

    r34967 r39926  
    265265            ref->Color    = 0.0;
    266266        }
     267        ref->magCal   = ref->Mag;
    267268
    268269        // XXX VERY temporary hack to avoid M31 bulge
     
    306307            ref->Color = 0.0;
    307308        }
     309        ref->magCal   = ref->Mag;
    308310
    309311        // XXX VERY temporary hack to avoid M31 bulge
  • trunk/psastro/src/psastroModelAdjust.c

    r21409 r39926  
    2828    }
    2929
     30
     31   
    3032    // if we have not measured the boresite position, no adjustment is needed
    3133    bool fitBoresite = psMetadataLookupBool (&status, recipe, "PSASTRO.MODEL.FIT.BORESITE");
     
    5254        return false;
    5355    }
    54 
     56    float refChipAngleNominal = PS_RAD_DEG*psMetadataLookupF32 (&status, recipe, "PSASTRO.MODEL.REF.CHIP.ANGLE");
     57    if (!refChipName) {
     58        psError(PS_ERR_IO, true, "reference chip is missing from recipe");
     59        return false;
     60    }
     61
     62    int rotatorParity = psMetadataLookupS32(&status, recipe, "PSASTRO.MODEL.ROT.PARITY");
     63    if (!status) psAbort ("Can't find recipe option PSASTRO.MODEL.ROT.PARITY");
     64    psMetadataAddS32 (output->fpa->concepts, PS_LIST_TAIL, "FPA.ROT_PARITY", PS_META_REPLACE, "rotator parity parameter", rotatorParity);
     65   
    5566    // get reference chip from name
    5667    pmChip *refChip = pmConceptsChipFromName (output->fpa, refChipName);
     
    8192        psFree (PT);
    8293    }
    83 
     94   
    8495    // rotate the chip-to-FPA transforms to have 0.0 posangle for refChip;
    8596    // compensate by rotating fpa to TPA transform
    8697
    8798    // get the current posangle of the ref chip
    88     float chipAngle = atan2 (refChip->toFPA->y->coeff[1][0], refChip->toFPA->x->coeff[1][0]);
    89     fprintf (stderr, "chipAngle: %f\n", chipAngle*PS_DEG_RAD);
     99    // this should have a negative sign : chipAngle = -atan2 (dM/dy, dM/dx)
     100    float chipAngle = -atan2 (refChip->toFPA->y->coeff[1][0], refChip->toFPA->x->coeff[1][0]);
     101
     102    // chipAngle should be refChipAngleNominal @ POSANGLE = 0.0
     103    float posAngleOffset = rotatorParity * (chipAngle - refChipAngleNominal);
     104
     105    fprintf (stderr, "chipAngle is: %f, at PA = 0.0, it should be %f, rotating model by %f (parity %d)\n",
     106             chipAngle*PS_DEG_RAD, refChipAngleNominal*PS_DEG_RAD, posAngleOffset*PS_DEG_RAD, rotatorParity);
     107
    90108    // psMetadataAddF32 (output->fpa->concepts, PS_LIST_TAIL, "FPA.POSANGLE", PS_META_REPLACE, "boresite parameter", posangle);
    91109
     
    99117        psRegion *region = pmChipPixels (chip);
    100118
    101         psPlaneTransform *toFPA = psPlaneTransformRotate (NULL, chip->toFPA, chipAngle);
     119        // this should ALSO have a negative sign: this rotates by +posAngleOffset
     120        psPlaneTransform *toFPA = psPlaneTransformRotate (NULL, chip->toFPA, posAngleOffset);
    102121        psFree (chip->toFPA);
    103122        chip->toFPA = toFPA;
    104123
    105124        // invert the new fromFPA transform to get the new toFPA transform
     125        // NOTE: when we call psPlaneTransformInvert here, we do not increase the order as in other places
    106126        psPlaneTransform *fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50);
    107127        psFree (chip->fromFPA);
     
    125145
    126146    psFree (output->fpa->fromTPA);
     147    // NOTE: when we call psPlaneTransformInvert here, we do not increase the order as in other places
    127148    output->fpa->fromTPA = psPlaneTransformInvert(NULL, output->fpa->toTPA, *fpaRegion, 50);
    128149
     
    131152
    132153    psMetadata *header = output->fpa->hdu->header;
     154   
    133155    pmAstromWriteBilevelMosaic (header, output->fpa, NONLIN_TOL);
    134156
     
    172194        // invert the new fromFPA transform to get the new toFPA transform
    173195        // the region used here is the region covered by the chip in the FPA
     196        // NOTE: when we call psPlaneTransformInvert here, we do not increase the order as in other places
    174197        psPlaneTransform *fromFPA = psPlaneTransformInvert(NULL, chip->toFPA, *region, 50);
    175198        psFree (chip->fromFPA);
  • trunk/psastro/src/psastroMosaicAstrom.c

    r27558 r39926  
    1515
    1616bool psastroMosaicFit (pmFPA *fpa, psMetadata *recipe, const char *rootname, int pass);
     17bool psastroProjectionRefit (pmFPA *fpa, psMetadata *recipe);
    1718
    1819// XXX require this fpa to have multiple chip extensions and a PHU?
     
    4344    if (!status) psAbort ("missing config value");
    4445
     46    // if projection is not TAN, fit the measured projection here and combine toTPA/fromTPA functions
     47    bool fitMosaicDistortion = true;
     48    if ((fpa->toSky->type != PS_PROJ_TAN) && (fpa->toSky->type != PS_PROJ_DIS)) {
     49      if (!psastroProjectionRefit (fpa, recipe)) psAbort ("failed to refit distortion");
     50      fitMosaicDistortion = false;
     51    }
     52
    4553    // this should be in a loop with nIter =
    46     for (int iter = 0; iter < nIter; iter++) {
     54    for (int iter = 0; fitMosaicDistortion && (iter < nIter); iter++) {
    4755        if (!psastroMosaicFit (fpa, recipe, outroot, iter)) return false;
    4856    }
    4957
    50     // now fit the chips under the common distortion with higher-order terms
    51     // first, re-perform the match with a slightly tighter circle
    52     if (!psastroMosaicSetMatch (fpa, recipe, nIter)) {
    53         psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass)");
    54         return false;
    55     }
    56     if (!psastroMosaicChipAstrom (fpa, recipe, nIter)) {
    57         psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (4th pass)");
    58         return false;
    59     }
    60 
    61     if (psTraceGetLevel("psastro.dump") > 0) {
     58    for (int iter = 0; (iter < nIter); iter++) {
     59      // now fit the chips under the common distortion with higher-order terms
     60      // first, re-perform the match with a slightly tighter circle
     61      if (!psastroMosaicSetMatch (fpa, recipe, iter)) {
     62        psError(PSASTRO_ERR_UNKNOWN, false, "failed to match raw and ref stars for mosaic (4th pass %d)", iter);
     63        return false;
     64      }
     65      if (!psastroMosaicChipAstrom (fpa, recipe, iter)) {
     66        psError(PSASTRO_ERR_UNKNOWN, false, "failed to measure chip astrometry in mosaic mode (pass %d)", iter);
     67        return false;
     68      }
     69     
     70      if (psTraceGetLevel("psastro.dump") > 0) {
    6271        // the last filename (see filenames in psastroMosaicFit)
    6372        char filename[256];
    6473        snprintf (filename, 256, "%s.%d.dat", outroot, 2*nIter + 2);
    6574        psastroDumpMatches (fpa, filename);
    66     }
    67 
     75      }
     76    }
     77   
    6878    // save WCS and analysis metadata in update header.
    6979    // (pull or create local view to entry on readout->analysis)
     
    154164    return true;
    155165}
     166
     167// we have a fpa->toSky projection which is NOT of type TAN along with a toTPA which is
     168// the Identity transform.  we want to convert this to TAN projection plus a non-identity
     169// transformation to take the non-TAN components.
     170
     171// we are going to generate a set of FP->(x,y) using the current projection + fromTPA
     172// transformations along with a set of TP->(x,y) values using the desired TAN projection,
     173// then we will fit TP vs FP
     174
     175bool psastroProjectionRefit (pmFPA *fpa, psMetadata *recipe) {
     176
     177  bool status;
     178
     179    // allocate mosaic-level polynomial transformation and set masks needed by DVO
     180    int order = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.ORDER");
     181    if (!status) {
     182        psError(PSASTRO_ERR_UNKNOWN, false, "failed to find mosaic distortion fit order\n");
     183        return false;
     184    }
     185
     186    pmChip *chip = NULL;
     187    pmCell *cell = NULL;
     188    pmReadout *readout = NULL;
     189    pmFPAview *view = pmFPAviewAlloc (0);
     190
     191    psVector *L = psVectorAllocEmpty (1000, PS_TYPE_F32);
     192    psVector *M = psVectorAllocEmpty (1000, PS_TYPE_F32);
     193
     194    psVector *P = psVectorAllocEmpty (1000, PS_TYPE_F32);
     195    psVector *Q = psVectorAllocEmpty (1000, PS_TYPE_F32);
     196
     197    psProjection *toSkyTan = psProjectionAlloc (fpa->toSky->R, fpa->toSky->D, fpa->toSky->Xs, fpa->toSky->Ys, PS_PROJ_TAN);
     198
     199    float xMin = NAN;
     200    float xMax = NAN;
     201    float yMin = NAN;
     202    float yMax = NAN;
     203
     204    bool firstObject = true;
     205
     206    // this loop selects the matched stars for all chips
     207    while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) {
     208        psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
     209        if (!chip->process || !chip->file_exists) continue;
     210       
     211        while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) {
     212            psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     213            if (!cell->process || !cell->file_exists) continue;
     214
     215            // process each of the readouts
     216            // XXX there can only be one readout per chip, right?
     217            while ((readout = pmFPAviewNextReadout (view, fpa, 1)) != NULL) {
     218                if (! readout->data_exists) continue;
     219
     220                // select the raw objects for this readout
     221                psArray *refstars = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.REFSTARS.SUBSET");
     222                if (refstars == NULL) continue;
     223                psTrace ("psastro", 4, "Trying %ld refstars\n", refstars->n);
     224
     225                psArray *matches = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.MATCH");
     226                if (matches == NULL) continue;
     227
     228                // we are looking over the matched refstars only to be sure we are
     229                // covering the valid space of the projection + transformation, and not
     230                // beyond
     231
     232                for (int i = 0; i < matches->n; i++) {
     233                    pmAstromMatch *match = matches->data[i];
     234                    pmAstromObj *ref = refstars->data[match->ref];
     235
     236                    psPlane fpOld, tpNew, tpOld;
     237
     238                    psProject (&tpOld, ref->sky, fpa->toSky); // find the focal-plane coord of this RA,DEC coord using the ref chip projection
     239                    psPlaneTransformApply (&fpOld, fpa->fromTPA, &tpOld);
     240
     241                    psProject (&tpNew, ref->sky, toSkyTan); // find the focal-plane coord of this RA,DEC coord using the ref chip projection
     242
     243                    psVectorAppend (L, fpOld.x);
     244                    psVectorAppend (M, fpOld.y);
     245
     246                    psVectorAppend (P, tpNew.x);
     247                    psVectorAppend (Q, tpNew.y);
     248
     249                    if (firstObject) {
     250                      xMin = xMax = fpOld.x;
     251                      yMin = yMax = fpOld.y;
     252                      firstObject = false;
     253                    }
     254
     255                    xMin = PS_MIN (xMin, fpOld.x);
     256                    xMax = PS_MAX (xMax, fpOld.x);
     257                    yMin = PS_MIN (yMin, fpOld.y);
     258                    yMax = PS_MAX (yMax, fpOld.y);
     259                }
     260            }
     261        }
     262    }
     263
     264    // the original transforms are (1, 1), but we will need higher order to fit the distortions
     265    psFree (fpa->toTPA);
     266
     267    // the original transforms are (1, 1), but we will need higher order to fit the distortions
     268    fpa->toTPA = psPlaneTransformAlloc (order, order);
     269    for (int i = 0; i <= fpa->toTPA->x->nX; i++) {
     270        for (int j = 0; j <= fpa->toTPA->x->nY; j++) {
     271            if (i + j > order) {
     272                fpa->toTPA->x->coeffMask[i][j] = PS_POLY_MASK_SET;
     273                fpa->toTPA->y->coeffMask[i][j] = PS_POLY_MASK_SET;
     274            }
     275        }
     276    }
     277
     278    psVectorFitPolynomial2D (fpa->toTPA->x, NULL, 0, P, NULL, L, M);
     279    psVectorFitPolynomial2D (fpa->toTPA->y, NULL, 0, Q, NULL, L, M);
     280   
     281    psRegion fitRegion = psRegionSet (xMin, xMax, yMin, yMax);
     282
     283    // psPlaneTransformInvert will generate a new fromTPA with order to match toTPA
     284    psFree (fpa->fromTPA);
     285    psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+4, fpa->toTPA->x->nY+4);
     286    fpa->fromTPA = psPlaneTransformInvert (myPT, fpa->toTPA, fitRegion, 100);
     287    psFree (myPT);
     288
     289    psFree (fpa->toSky);
     290    fpa->toSky = toSkyTan;
     291
     292    psFree (L);
     293    psFree (M);
     294    psFree (P);
     295    psFree (Q);
     296
     297    psFree (view);
     298
     299    if (!psastroMosaicSetAstrom (fpa)) {
     300        psError(PSASTRO_ERR_UNKNOWN, false, "failed to apply mosaic distortion terms\n");
     301        return false;
     302    }
     303
     304    return true;
     305}
     306
  • trunk/psastro/src/psastroMosaicCorrectDistortion.c

    r21409 r39926  
    6262
    6363    psFree (fpa->fromTPA);
    64     fpa->fromTPA = psPlaneTransformInvert(NULL, fpa->toTPA, *region, 50);
     64    psPlaneTransform *myPT = psPlaneTransformAlloc(fpa->toTPA->x->nX+4, fpa->toTPA->x->nY+4);
     65    fpa->fromTPA = psPlaneTransformInvert(myPT, fpa->toTPA, *region, 50);
     66    psFree (myPT);
    6567    psFree (region);
    6668
  • trunk/psastro/src/psastroMosaicGradients.c

    r26259 r39926  
    7979    int order = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.ORDER");
    8080    if (!status) {
    81         psError(PSASTRO_ERR_UNKNOWN, false, "failed to find single-chip fit order\n");
     81        psError(PSASTRO_ERR_UNKNOWN, false, "failed to find mosaic distortion fit order\n");
    8282        psFree (gradients);
    8383        psFree (view);
  • trunk/psastro/src/psastroMosaicOneChip.c

    r26259 r39926  
    100100    }
    101101
    102     // XXX allow statitic to be set by the user
     102    // XXX allow statistic to be set by the user
    103103    // only clip if we are fitting the chip parameters.
    104104    psStats *fitStats = NULL;
    105 //    if (order == 0) {
    106 //      fitStats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV);
    107 //      fitStats->clipSigma = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NSIGMA");
    108 //      fitStats->clipIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NITER");
    109 //    } else {
    110         fitStats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV);
    111         fitStats->clipSigma = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NSIGMA");
    112         fitStats->clipIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NITER");
    113 //    }
     105    if (FALSE && (order == 0)) {
     106      fitStats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV);
     107      fitStats->clipSigma = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NSIGMA");
     108      fitStats->clipIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NITER");
     109    } else {
     110      fitStats = psStatsAlloc (PS_STAT_CLIPPED_MEAN | PS_STAT_CLIPPED_STDEV);
     111      fitStats->clipSigma = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NSIGMA");
     112      fitStats->clipIter = psMetadataLookupS32 (&status, recipe, "PSASTRO.MOSAIC.CHIP.NITER");
     113    }
    114114
    115115    // need to pass in an update header, sent in from above
    116     pmAstromFitResults *results = pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, fitStats);
     116    pmAstromFitResults *results = pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, fitStats, recipe);
    117117    if (!results) {
    118118        psError(PSASTRO_ERR_DATA, false, "failed to perform the matched fit\n");
  • trunk/psastro/src/psastroOneChipFit.c

    r36914 r39926  
    124124
    125125        // improved fit for astrometric terms
    126         results = pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, fitStats);
     126        results = pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, fitStats, recipe);
    127127        if (!results) {
    128128            psLogMsg ("psastro", 3, "failed to perform the matched fit\n");
Note: See TracChangeset for help on using the changeset viewer.