Changeset 28249 for trunk/ippToPsps/src
- Timestamp:
- Jun 7, 2010, 2:58:52 PM (16 years ago)
- Location:
- trunk/ippToPsps/src
- Files:
-
- 5 edited
-
ippToPsps.c (modified) (5 diffs)
-
ippToPsps.h (modified) (1 diff)
-
ippToPspsBatchDetection.c (modified) (1 diff)
-
ippToPspsConfig.c (modified) (1 diff)
-
ippToPspsConfig.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPsps.c
r28205 r28249 93 93 if (this->numOfInputFiles < 1) return false; 94 94 95 96 95 this->inputFiles = (char**)calloc(this->numOfInputFiles, sizeof(char*)); 97 96 for(uint32_t i=0; i<this->numOfInputFiles; i++) … … 145 144 psMetadataAddStr(arguments, PS_LIST_TAIL, "-expid", 0, "Exposure ID", NULL); 146 145 psMetadataAddStr(arguments, PS_LIST_TAIL, "-expname", 0, "Exposure name", NULL); 146 psMetadataAddStr(arguments, PS_LIST_TAIL, "-survey", 0, "Survey type", NULL); 147 147 psMetadataAddStr(arguments, PS_LIST_TAIL, "-input", 0, "Path to FITS inout", NULL); 148 148 psMetadataAddStr(arguments, PS_LIST_TAIL, "-output", 0, "Path to FITS output", NULL); … … 163 163 //free(tmp); tmp = NULL; 164 164 this->expName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-expname")); 165 this->surveyType = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-survey")); 165 166 this->fitsInPath = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-input")); 166 167 this->resultsPath = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-results")); … … 179 180 if ( 180 181 (this->batchType != BATCH_INIT && !this->expName) || 182 (this->batchType != BATCH_INIT && !this->surveyType) || 181 183 (this->batchType != BATCH_INIT && !this->fitsInPath) || 182 184 (this->batchType != BATCH_INIT && !this->resultsPath) || … … 241 243 this->expId = -1; 242 244 this->expName = NULL; 245 this->surveyType = NULL; 243 246 this->fitsInPath = NULL; 244 247 this->resultsPath = NULL; -
trunk/ippToPsps/src/ippToPsps.h
r28205 r28249 22 22 uint32_t expId; // the exposure ID to be used 23 23 psString expName; // the exposure name 24 psString surveyType; // the survey type, eg 3PI, MD01, STS, SSS 24 25 uint8_t batchType; // PSPS batch type 25 26 psString fitsInPath; // path to FITS input -
trunk/ippToPsps/src/ippToPspsBatchDetection.c
r28205 r28249 65 65 fits_write_col(this->fitsOut, TSTRING, FRAMEMETA_FRAMENAME, 1, 1, 1, &this->expName, &status); 66 66 67 int8_t surveyID = 0; // TODO 67 int8_t surveyID = -1; 68 if (!ippToPspsConfig_getSurveyId(this->config, this->surveyType, &surveyID)) {return PS_EXIT_DATA_ERROR;} 68 69 fits_write_col(this->fitsOut, TBYTE, FRAMEMETA_SURVEYID, 1, 1, 1, &surveyID, &status); 69 70 70 71 int8_t filterID = -1; 71 i ppToPspsConfig_getFilterId(this->config, filterType, &filterID);72 if (!ippToPspsConfig_getFilterId(this->config, filterType, &filterID)) {return PS_EXIT_DATA_ERROR;} 72 73 fits_write_col(this->fitsOut, TBYTE, FRAMEMETA_FILTERID, 1, 1, 1, &filterID, &status); 73 74 -
trunk/ippToPsps/src/ippToPspsConfig.c
r27779 r28249 325 325 326 326 return ret; 327 } 328 329 // gets survey ID from survey name 330 bool ippToPspsConfig_getSurveyId(IppToPspsConfig* this, const char* surveyType, int8_t* surveyId) { 331 332 char buffer[10]; 333 if (!ippToPspsConfig_getInitValue(this, "Survey", "name", surveyType, "surveyID", buffer)) { 334 335 *surveyId = -1; 336 return false; 337 } 338 339 *surveyId = atoi(buffer); 340 return true; 327 341 } 328 342 -
trunk/ippToPsps/src/ippToPspsConfig.h
r27345 r28249 59 59 // getters 60 60 bool ippToPspsConfig_getFilterId(IppToPspsConfig* this, const char* filterType, int8_t* filterId); 61 bool ippToPspsConfig_getSurveyId(IppToPspsConfig* this, const char* surveyType, int8_t* surveyId); 61 62 62 63 #endif // IPPTOPSPSCONFIG_H
Note:
See TracChangeset
for help on using the changeset viewer.
