IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 11, 2016, 2:33:18 PM (10 years ago)
Author:
eugene
Message:

add skips for chips without a valid solution (do not just crash); add recipe value for PSASTRO.MODEL.REF.CHIP.ANGLE, the position angle expected for the reference chip for an exposure with PA = 0.0; posAngle needs to be adjusted to match reference chip target value; if the projection is not TAN or DIS when attempting bilevel mosaic fitting, re-fit the projection + distortion to be TAN + distortion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/psastro/src/psastroModelAdjust.c

    r21409 r39686  
    5252        return false;
    5353    }
     54    float refChipAngleNominal = PS_RAD_DEG*psMetadataLookupF32 (&status, recipe, "PSASTRO.MODEL.REF.CHIP.ANGLE");
     55    if (!refChipName) {
     56        psError(PS_ERR_IO, true, "reference chip is missing from recipe");
     57        return false;
     58    }
    5459
    5560    // get reference chip from name
     
    8792    // get the current posangle of the ref chip
    8893    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);
     94
     95    // chipAngle should be refChipAngleNominal @ POSANGLE = 0.0
     96    float posAngleOffset = chipAngle - refChipAngleNominal;
     97
     98    fprintf (stderr, "chipAngle is: %f, at PA = 0.0, it should be %f, rotating model by %f\n",
     99             chipAngle*PS_DEG_RAD, refChipAngleNominal*PS_DEG_RAD, posAngleOffset*PS_DEG_RAD);
     100
    90101    // psMetadataAddF32 (output->fpa->concepts, PS_LIST_TAIL, "FPA.POSANGLE", PS_META_REPLACE, "boresite parameter", posangle);
    91102
     
    99110        psRegion *region = pmChipPixels (chip);
    100111
    101         psPlaneTransform *toFPA = psPlaneTransformRotate (NULL, chip->toFPA, chipAngle);
     112        psPlaneTransform *toFPA = psPlaneTransformRotate (NULL, chip->toFPA, posAngleOffset);
    102113        psFree (chip->toFPA);
    103114        chip->toFPA = toFPA;
Note: See TracChangeset for help on using the changeset viewer.