- Timestamp:
- Sep 11, 2016, 2:33:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20160809/psastro/src/psastroModelAdjust.c
r21409 r39686 52 52 return false; 53 53 } 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 } 54 59 55 60 // get reference chip from name … … 87 92 // get the current posangle of the ref chip 88 93 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 90 101 // psMetadataAddF32 (output->fpa->concepts, PS_LIST_TAIL, "FPA.POSANGLE", PS_META_REPLACE, "boresite parameter", posangle); 91 102 … … 99 110 psRegion *region = pmChipPixels (chip); 100 111 101 psPlaneTransform *toFPA = psPlaneTransformRotate (NULL, chip->toFPA, chipAngle);112 psPlaneTransform *toFPA = psPlaneTransformRotate (NULL, chip->toFPA, posAngleOffset); 102 113 psFree (chip->toFPA); 103 114 chip->toFPA = toFPA;
Note:
See TracChangeset
for help on using the changeset viewer.
