Changeset 28249
- Timestamp:
- Jun 7, 2010, 2:58:52 PM (16 years ago)
- Location:
- trunk/ippToPsps
- Files:
-
- 6 edited
-
scripts/ippToPsps_run.pl (modified) (6 diffs)
-
src/ippToPsps.c (modified) (5 diffs)
-
src/ippToPsps.h (modified) (1 diff)
-
src/ippToPspsBatchDetection.c (modified) (1 diff)
-
src/ippToPspsConfig.c (modified) (1 diff)
-
src/ippToPspsConfig.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/scripts/ippToPsps_run.pl
r28205 r28249 70 70 71 71 # make a temporary file for saving results 72 my ($resultsFile, $resultsFileName) = tempfile( "/tmp/ results.XXXX", UNLINK => !$save_temps);72 my ($resultsFile, $resultsFileName) = tempfile( "/tmp/ippToPsps_results.XXXX", UNLINK => !$save_temps); 73 73 74 74 process(); … … 86 86 if ($distGroup =~ m/^MD([0-1][0-9])$/i) {return "MD$1";} 87 87 if ($distGroup =~ m/^M31$/i) {return "M31";} 88 if ($distGroup =~ m/^sts$/i) {return "STS ";}88 if ($distGroup =~ m/^sts$/i) {return "STS1";} 89 89 if ($distGroup =~ m/^SweetSpot$/i) {return "SSS";} 90 90 if ($distGroup =~ m/^(3PI)|(ThreePi)|(SAS)$/i) {return "3PI";} … … 140 140 AND chipRun.exp_id = rawExp.exp_id 141 141 AND camRun.dist_group = '$survey' 142 AND rawExp.exp_id > 145986143 142 GROUP BY rawExp.exp_id 144 143 ORDER BY rawExp.exp_id ASC; … … 627 626 my $fullJobPath = "$path/$job"; 628 627 629 my ($tempFile, $tempName) = tempfile( "/tmp/ dsregList.XXXX", UNLINK => !$save_temps);628 my ($tempFile, $tempName) = tempfile( "/tmp/ippToPsps_dsregList.XXXX", UNLINK => !$save_temps); 630 629 631 630 # loop through all batch files in this job directory … … 718 717 719 718 # now write the path to this file out to temp file 720 my ($tempFile, $tempName) = tempfile( "/tmp/i nputFileList.XXXX", UNLINK => !$save_temps);719 my ($tempFile, $tempName) = tempfile( "/tmp/ippToPsps_inputFileList.XXXX", UNLINK => !$save_temps); 721 720 print $tempFile $realFile . "\n"; 722 721 close $tempFile; … … 794 793 $command .= " -expid $expid"; 795 794 $command .= " -expname $expName"; 795 $command .= " -survey $surveyType"; 796 796 $command .= " -batch $batchType"; 797 797 $command .= " -results $resultsFileName"; -
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.
