IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psModules/src/astrom/pmAstrometryModel.c

    r36834 r39926  
    320320    // the PosZero is the offset between the reported and actual POSANGLE values
    321321    float PosZero = psMetadataLookupF32 (&status, file->fpa->concepts, "FPA.POS_ZERO");  /// XXX be consistent with degrees v radians
     322    // Indicate which direction the position angle goes
     323    int rotParity = psMetadataLookupS32 (&status, file->fpa->concepts, "FPA.ROT_PARITY");
    322324    char *refChip = psMetadataLookupStr (&status, file->fpa->concepts, "FPA.REF.CHIP");
    323325
     
    349351
    350352    psMetadataAddF32(row,    PS_LIST_TAIL, "POS_ZERO", PS_META_REPLACE, "POSANGLE offset (degrees)", PosZero);
     353    psMetadataAddS32(row,    PS_LIST_TAIL, "ROT_PARITY", PS_META_REPLACE, "rotator parity", rotParity);
    351354    psMetadataAddStr(row,    PS_LIST_TAIL, "REF_CHIP", PS_META_REPLACE, "reference chip for model", refChip);
    352355
     
    624627    TRANSFER (file->fpa->concepts, row, "BORE_P0");
    625628    TRANSFER (file->fpa->concepts, row, "POS_ZERO");
     629    TRANSFER (file->fpa->concepts, row, "ROT_PARITY");
    626630    TRANSFER (file->fpa->concepts, row, "REF_CHIP");
    627631
     
    687691    char *refChip  = psMetadataLookupStr(&status, file->fpa->concepts, "REF_CHIP"); REQUIRE (status, "missing REF_CHIP");
    688692
     693    int rotatorParity = psMetadataLookupS32(&status, file->fpa->concepts, "ROT_PARITY"); REQUIRE (status, "missing ROT_PARITY");
     694   
    689695    // XXX we've swapped the sign and parity of POS (add to model)
    690696    // apply true posangle = -(POS - POS_ZERO)
    691697    psLogMsg ("psModules.astrom", 4, "Position Angle: %f, Model Position Angle Zero Point: %f\n", POS, PosZero);
    692     psPlaneTransform *fromTPA = psPlaneTransformRotate (NULL, file->fpa->fromTPA, (PosZero - POS));
     698    psPlaneTransform *fromTPA = psPlaneTransformRotate (NULL, file->fpa->fromTPA, rotatorParity * (PosZero - POS));
    693699    psFree (file->fpa->fromTPA);
    694700    file->fpa->fromTPA = fromTPA;
Note: See TracChangeset for help on using the changeset viewer.