Changeset 13832
- Timestamp:
- Jun 14, 2007, 8:58:44 AM (19 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 3 edited
-
psastro.h (modified) (1 diff)
-
psastroAnalysis.c (modified) (1 diff)
-
psastroAstromGuess.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastro.h
r12806 r13832 30 30 bool psastroConvertReadout (pmReadout *readout, psMetadata *recipe); 31 31 psArray *pmSourceToAstromObj (psArray *sources); 32 bool psastroAstromGuess ( pmConfig *config);32 bool psastroAstromGuess (int *nStars, pmConfig *config); 33 33 34 34 psPlaneDistort *psPlaneDistortIdentity (); -
trunk/psastro/src/psastroAnalysis.c
r12806 r13832 3 3 bool psastroAnalysis (pmConfig *config) { 4 4 5 int nStars; 6 5 7 // interpret the available initial astrometric information 6 8 // apply the initial guess 7 if (!psastroAstromGuess ( config)) {9 if (!psastroAstromGuess (&nStars, config)) { 8 10 psError (PSASTRO_ERR_UNKNOWN, false, "failed to determine initial astrometry guess\n"); 9 11 return false; 12 } 13 if (nStars == 0) { 14 psLogMsg ("psastro", 2, "skipping astrometry analysis : no stars\n"); 15 return true; 10 16 } 11 17 -
trunk/psastro/src/psastroAstromGuess.c
r12806 r13832 7 7 // headers corresponding to the chips. 8 8 9 bool psastroAstromGuess ( pmConfig *config) {9 bool psastroAstromGuess (int *nStars, pmConfig *config) { 10 10 11 11 bool newFPA = true; … … 22 22 pmCell *cell = NULL; 23 23 pmReadout *readout = NULL; 24 25 *nStars = 0; 24 26 25 27 // select the current recipe … … 92 94 if (rawstars == NULL) { continue; } 93 95 96 *nStars += rawstars->n; 94 97 for (int i = 0; i < rawstars->n; i++) { 95 98 pmAstromObj *raw = rawstars->data[i]; … … 122 125 } 123 126 127 // how many total sources are available to us? 128 psMetadataAddS32 (recipe, PS_LIST_TAIL, "NTOTSTAR", PS_META_REPLACE, "", *nStars); 129 if (*nStars == 0) { 130 psLogMsg ("psastro", 2, "no sources available for astrometry\n"); 131 return true; 132 } 133 124 134 psLogMsg ("psastro", 2, "loaded raw data from %f,%f to %f,%f\n", 125 135 DEG_RAD*RAmin, DEG_RAD*DECmin, 126 136 DEG_RAD*RAmax, DEG_RAD*DECmax); 127 137 128 psMetadataAdd (recipe, PS_LIST_TAIL, "RA_MIN", PS_DATA_F32 |PS_META_REPLACE, "", RAmin);129 psMetadataAdd (recipe, PS_LIST_TAIL, "RA_MAX", PS_DATA_F32 |PS_META_REPLACE, "", RAmax);130 psMetadataAdd (recipe, PS_LIST_TAIL, "DEC_MIN", PS_DATA_F32 |PS_META_REPLACE, "", DECmin);131 psMetadataAdd (recipe, PS_LIST_TAIL, "DEC_MAX", PS_DATA_F32 |PS_META_REPLACE, "", DECmax);138 psMetadataAddF32 (recipe, PS_LIST_TAIL, "RA_MIN", PS_META_REPLACE, "", RAmin); 139 psMetadataAddF32 (recipe, PS_LIST_TAIL, "RA_MAX", PS_META_REPLACE, "", RAmax); 140 psMetadataAddF32 (recipe, PS_LIST_TAIL, "DEC_MIN", PS_META_REPLACE, "", DECmin); 141 psMetadataAddF32 (recipe, PS_LIST_TAIL, "DEC_MAX", PS_META_REPLACE, "", DECmax); 132 142 133 143 psFree (view);
Note:
See TracChangeset
for help on using the changeset viewer.
