Changeset 9641 for trunk/psastro/src/psastroAstromGuess.c
- Timestamp:
- Oct 18, 2006, 5:00:44 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroAstromGuess.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroAstromGuess.c
r9627 r9641 10 10 bool status = false; 11 11 bool isMosaic = false; 12 double RAmin = NAN, RAmax = NAN, RAminSky = NAN, RAmaxSky = NAN; 13 double DECmin = NAN, DECmax = NAN; 12 double RAmin = NAN; 13 double RAmax = NAN; 14 double RAminSky = NAN; 15 double RAmaxSky = NAN; 16 double DECmin = NAN; 17 double DECmax = NAN; 14 18 15 19 pmChip *chip = NULL; … … 54 58 if (newFPA) { 55 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; 56 62 RAminSky = fpa->projection->R - M_PI; 57 63 RAmaxSky = fpa->projection->R + M_PI; … … 80 86 p_psDeproject (raw->sky, raw->TP, fpa->projection); 81 87 82 if ( (i < 10) && (psTraceGetLevel("psastro") > 5)) {83 fprintf (stderr, "up: %f,%f -> %f,%f -> %f,%f -> %f,%f\n",88 if (i < 10) { 89 psTrace ("psastro", 8, "up: %f,%f -> %f,%f -> %f,%f -> %f,%f\n", 84 90 raw->chip->x, raw->chip->y, 85 91 raw->FP->x, raw->FP->y, 86 92 raw->TP->x, raw->TP->y, 87 93 raw->sky->r, raw->sky->d); 88 94 89 95 psPlane *fp = psPlaneAlloc(); 90 96 psPlane *tp = psPlaneAlloc(); 91 97 psPlane *ch = psPlaneAlloc(); 92 98 93 99 p_psProject (tp, raw->sky, fpa->projection); 94 100 psPlaneDistortApply (fp, fpa->fromTangentPlane, tp, 0.0, 0.0); 95 101 psPlaneTransformApply (ch, chip->fromFPA, fp); 96 97 fprintf (stderr, "dn: %f,%f <- %f,%f <- %f,%f <- %f,%f\n",102 103 psTrace ("psastro", 8, "dn: %f,%f <- %f,%f <- %f,%f <- %f,%f\n", 98 104 ch->x, ch->y, 99 105 fp->x, fp->y, … … 107 113 108 114 // rationalize ra to sky range centered on boresite 109 while (raw->sky->r < RAminSky) raw->sky->r += M_PI;110 while (raw->sky->r > RAmaxSky) raw->sky->r -= M_PI;115 while (raw->sky->r < RAminSky) raw->sky->r += 2.0*M_PI; 116 while (raw->sky->r > RAmaxSky) raw->sky->r -= 2.0*M_PI; 111 117 112 118 RAmin = PS_MIN (raw->sky->r, RAmin); … … 120 126 } 121 127 122 psLogMsg ("psastro", 2, "loaded data from %f,%f - %f,%f\n", RAmin, DECmin, RAmax, DECmax); 128 psLogMsg ("psastro", 2, "loaded raw data from %f,%f to %f,%f\n", 129 DEG_RAD*RAmin, DEG_RAD*DECmin, 130 DEG_RAD*RAmax, DEG_RAD*DECmax); 123 131 124 132 psMetadataAdd (recipe, PS_LIST_TAIL, "RA_MIN", PS_DATA_F32 | PS_META_REPLACE, "", RAmin);
Note:
See TracChangeset
for help on using the changeset viewer.
