Changeset 10613
- Timestamp:
- Dec 10, 2006, 8:37:37 AM (19 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 9 edited
-
psastro.h (modified) (1 diff)
-
psastroAstromGuess.c (modified) (3 diffs)
-
psastroChipAstrom.c (modified) (1 diff)
-
psastroChooseRefstars.c (modified) (1 diff)
-
psastroMosaicAstrom.c (modified) (1 diff)
-
psastroMosaicHeaders.c (modified) (1 diff)
-
psastroMosaicSetAstrom.c (modified) (2 diffs)
-
psastroUtils.c (modified) (1 diff)
-
psastroWCS.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.h
r10513 r10613 17 17 # define RAD_DEG 0.017453292519943 18 18 # define SIGN(X) (((X) == 0) ? 0 : ((fabs((double)(X))) / (X))) 19 20 # define fromTPA fromTangentPlane21 # define toTPA toTangentPlane22 # define toSky projection23 19 24 20 // this structure represents a fit to the logN / logS curve for a set of stars -
trunk/psastro/src/psastroAstromGuess.c
r10438 r10613 58 58 if (newFPA) { 59 59 newFPA = false; 60 while (fpa-> projection->R < 0) fpa->projection->R += 2.0*M_PI;61 while (fpa-> projection->R > 2.0*M_PI) fpa->projection->R -= 2.0*M_PI;62 RAminSky = fpa-> projection->R - M_PI;63 RAmaxSky = fpa-> projection->R + M_PI;64 RAmin = RAmax = fpa-> projection->R;65 DECmin = DECmax = fpa-> projection->D;60 while (fpa->toSky->R < 0) fpa->toSky->R += 2.0*M_PI; 61 while (fpa->toSky->R > 2.0*M_PI) fpa->toSky->R -= 2.0*M_PI; 62 RAminSky = fpa->toSky->R - M_PI; 63 RAmaxSky = fpa->toSky->R + M_PI; 64 RAmin = RAmax = fpa->toSky->R; 65 DECmin = DECmax = fpa->toSky->D; 66 66 } 67 67 … … 83 83 84 84 psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip); 85 psPlaneDistortApply (raw->TP, fpa->toT angentPlane, raw->FP, 0.0, 0.0);86 p _psDeproject (raw->sky, raw->TP, fpa->projection);85 psPlaneDistortApply (raw->TP, fpa->toTPA, raw->FP, 0.0, 0.0); 86 psDeproject (raw->sky, raw->TP, fpa->toSky); 87 87 88 88 if (i < 10) { … … 97 97 psPlane *ch = psPlaneAlloc(); 98 98 99 p _psProject (tp, raw->sky, fpa->projection);100 psPlaneDistortApply (fp, fpa->fromT angentPlane, tp, 0.0, 0.0);99 psProject (tp, raw->sky, fpa->toSky); 100 psPlaneDistortApply (fp, fpa->fromTPA, tp, 0.0, 0.0); 101 101 psPlaneTransformApply (ch, chip->fromFPA, fp); 102 102 -
trunk/psastro/src/psastroChipAstrom.c
r10513 r10613 55 55 return false; 56 56 } 57 pmAstromWriteWCS (chip->toFPA, fpa->toT angentPlane, fpa->toSky, updates, plateScale);57 pmAstromWriteWCS (chip->toFPA, fpa->toTPA, fpa->toSky, updates, plateScale); 58 58 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.HEADER", PS_DATA_METADATA, "psastro header stats", updates); 59 59 psFree (updates); -
trunk/psastro/src/psastroChooseRefstars.c
r10438 r10613 62 62 63 63 // XXX why is this still a private function? 64 p _psProject (ref->TP, ref->sky, fpa->projection);65 psPlaneDistortApply (ref->FP, fpa->fromT angentPlane, ref->TP, 0.0, 0.0);64 psProject (ref->TP, ref->sky, fpa->toSky); 65 psPlaneDistortApply (ref->FP, fpa->fromTPA, ref->TP, 0.0, 0.0); 66 66 psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP); 67 67 -
trunk/psastro/src/psastroMosaicAstrom.c
r10438 r10613 28 28 29 29 // XXX no input distortion model yet; existing fpa distortion is identity: replace it 30 psFree (fpa->toT angentPlane);31 psFree (fpa->fromT angentPlane);32 fpa->toT angentPlane= psPlaneDistortIdentity (order);33 fpa->fromT angentPlane= psPlaneDistortIdentity (order);30 psFree (fpa->toTPA); 31 psFree (fpa->fromTPA); 32 fpa->toTPA = psPlaneDistortIdentity (order); 33 fpa->fromTPA = psPlaneDistortIdentity (order); 34 34 35 35 grads = psastroMosaicGetGrads (fpa, recipe); -
trunk/psastro/src/psastroMosaicHeaders.c
r10438 r10613 39 39 } 40 40 41 psMetadata *mosaic = pmAstromWriteBilevelMosaic (fpa-> projection, fpa->toTangentPlane, plateScale);41 psMetadata *mosaic = pmAstromWriteBilevelMosaic (fpa->toSky, fpa->toTPA, plateScale); 42 42 43 43 // XXX what is the EXTNAME?? -
trunk/psastro/src/psastroMosaicSetAstrom.c
r9574 r10613 30 30 31 31 psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip); 32 psPlaneDistortApply (raw->TP, fpa->toT angentPlane, raw->FP, 0.0, 0.0);33 p _psDeproject (raw->sky, raw->TP, fpa->projection);32 psPlaneDistortApply (raw->TP, fpa->toTPA, raw->FP, 0.0, 0.0); 33 psDeproject (raw->sky, raw->TP, fpa->toSky); 34 34 } 35 35 … … 40 40 pmAstromObj *ref = refstars->data[i]; 41 41 42 p _psProject (ref->TP, ref->sky, fpa->projection);43 psPlaneDistortApply (ref->FP, fpa->fromT angentPlane, ref->TP, 0.0, 0.0);42 psProject (ref->TP, ref->sky, fpa->toSky); 43 psPlaneDistortApply (ref->FP, fpa->fromTPA, ref->TP, 0.0, 0.0); 44 44 psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP); 45 45 } -
trunk/psastro/src/psastroUtils.c
r9732 r10613 13 13 14 14 psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip); 15 psPlaneDistortApply (raw->TP, fpa->toT angentPlane, raw->FP, 0.0, 0.0);16 p _psDeproject (raw->sky, raw->TP, fpa->projection);15 psPlaneDistortApply (raw->TP, fpa->toTPA, raw->FP, 0.0, 0.0); 16 psDeproject (raw->sky, raw->TP, fpa->toSky); 17 17 } 18 18 -
trunk/psastro/src/psastroWCS.c
r10600 r10613 138 138 if (fpa->toSky == NULL) { 139 139 // XXX for now, use the identity for TPA <--> FPA 140 fpa->toT angentPlane= psPlaneDistortIdentity (1);141 fpa->fromT angentPlane= psPlaneDistortIdentity (1);140 fpa->toTPA = psPlaneDistortIdentity (1); 141 fpa->fromTPA = psPlaneDistortIdentity (1); 142 142 fpa->toSky = toSky; 143 143 } else { 144 if (fpa->toT angentPlane== NULL) psAbort ("wcs", "projection defined, tangent-plane not defined");145 if (fpa->fromT angentPlane== NULL) psAbort ("wcs", "projection defined, tangent-plane not defined");144 if (fpa->toTPA == NULL) psAbort ("wcs", "projection defined, tangent-plane not defined"); 145 if (fpa->fromTPA == NULL) psAbort ("wcs", "projection defined, tangent-plane not defined"); 146 146 147 147 // adjust for common toSky for mosaic: … … 154 154 155 155 psPlaneTransformApply (fp, toFPA, chip); // find the focal-plane coordinate of this chip's 0,0 coordinate 156 p _psDeproject (sky, fp, toSky); // find the RA,DEC coord of the focal-plane coordinate157 p _psProject (fp, sky, fpa->toSky); // find the focal-plane coord of this RA,DEC coord using the ref chip projection156 psDeproject (sky, fp, toSky); // find the RA,DEC coord of the focal-plane coordinate 157 psProject (fp, sky, fpa->toSky); // find the focal-plane coord of this RA,DEC coord using the ref chip projection 158 158 159 159 toFPA->x->coeff[0][0] = fp->x;
Note:
See TracChangeset
for help on using the changeset viewer.
