Changeset 36627 for branches/eam_branches/ipp-20140206
- Timestamp:
- Apr 1, 2014, 11:03:38 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140206
- Files:
-
- 48 edited
- 19 copied
-
. (modified) (1 prop)
-
ippScripts/scripts/dist_advancerun.pl (modified) (5 diffs)
-
ippScripts/scripts/dist_bundle.pl (modified) (3 diffs)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippScripts/scripts/publish_file.pl (modified) (1 prop)
-
ippScripts/scripts/sc_prepare_chip.pl (copied) (copied from trunk/ippScripts/scripts/sc_prepare_chip.pl )
-
ippScripts/scripts/sc_remote_exec.pl (copied) (copied from trunk/ippScripts/scripts/sc_remote_exec.pl )
-
ippScripts/scripts/sc_validate_files.pl (copied) (copied from trunk/ippScripts/scripts/sc_validate_files.pl )
-
ippScripts/scripts/sc_validate_processing.pl (copied) (copied from trunk/ippScripts/scripts/sc_validate_processing.pl )
-
ippTasks/staticsky.pro (modified) (2 diffs)
-
ippToPsps/jython/cleanup.py (modified) (2 diffs)
-
ippToPsps/jython/dxlayer.py (modified) (4 diffs)
-
ippToPsps/jython/odm.py (modified) (2 diffs)
-
ippToPsps/perl/deleteFromDXLayer.pl (modified) (1 diff)
-
ippToPsps/perl/deleteFromDXLayer2.pl (modified) (1 diff)
-
ippTools/share/Makefile.am (modified) (5 diffs)
-
ippTools/share/detselect_show.sql (copied) (copied from trunk/ippTools/share/detselect_show.sql )
-
ippTools/share/disttool_definebyquery_ff.sql (copied) (copied from trunk/ippTools/share/disttool_definebyquery_ff.sql )
-
ippTools/share/disttool_pending_ff.sql (copied) (copied from trunk/ippTools/share/disttool_pending_ff.sql )
-
ippTools/share/disttool_toadvance.sql (modified) (1 diff)
-
ippTools/share/fftool_export_input.sql (copied) (copied from trunk/ippTools/share/fftool_export_input.sql )
-
ippTools/share/fftool_export_result.sql (copied) (copied from trunk/ippTools/share/fftool_export_result.sql )
-
ippTools/share/fftool_export_run.sql (copied) (copied from trunk/ippTools/share/fftool_export_run.sql )
-
ippTools/share/fftool_export_summary.sql (copied) (copied from trunk/ippTools/share/fftool_export_summary.sql )
-
ippTools/share/fftool_result.sql (modified) (1 diff)
-
ippTools/share/fftool_summary.sql (modified) (1 diff)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/detselect.c (modified) (3 diffs)
-
ippTools/src/detselect.h (modified) (1 diff)
-
ippTools/src/detselectConfig.c (modified) (2 diffs)
-
ippTools/src/difftool.c (modified) (2 diffs)
-
ippTools/src/disttool.c (modified) (1 diff)
-
ippTools/src/fftool.c (modified) (8 diffs)
-
ippTools/src/fftool.h (modified) (1 diff)
-
ippTools/src/fftoolConfig.c (modified) (2 diffs)
-
ippTools/src/laptool.c (modified) (2 diffs)
-
ippTools/src/remotetool.c (modified) (3 diffs)
-
ippconfig/recipes/filerules-split.mdc (modified) (2 diffs)
-
ippconfig/recipes/ppSub.config (modified) (1 prop)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 prop)
-
ppBackground/src/Makefile.am (modified) (3 diffs)
-
ppBackground/src/ppBackground.c (modified) (1 diff)
-
ppBackground/src/ppBackgroundStack.c (copied) (copied from trunk/ppBackground/src/ppBackgroundStack.c )
-
ppBackground/src/ppBackgroundStack.h (copied) (copied from trunk/ppBackground/src/ppBackgroundStack.h )
-
ppBackground/src/ppBackgroundStackArguments.c (copied) (copied from trunk/ppBackground/src/ppBackgroundStackArguments.c )
-
ppBackground/src/ppBackgroundStackCamera.c (copied) (copied from trunk/ppBackground/src/ppBackgroundStackCamera.c )
-
ppBackground/src/ppBackgroundStackData.c (copied) (copied from trunk/ppBackground/src/ppBackgroundStackData.c )
-
ppBackground/src/ppBackgroundStackLoop.c (copied) (copied from trunk/ppBackground/src/ppBackgroundStackLoop.c )
-
ppBackground/src/ppBackgroundStackMath.c (copied) (copied from trunk/ppBackground/src/ppBackgroundStackMath.c )
-
ppStack/src/ppStackReadout.c (modified) (2 diffs)
-
ppSub/src/ppSubMatchPSFs.c (modified) (1 diff)
-
psLib/src/fits/psFitsImage.c (modified) (1 diff)
-
psphot/src (modified) (1 prop)
-
psphot/src/Makefile.am (modified) (1 diff)
-
psphot/src/psphot.h (modified) (1 diff)
-
psphot/src/psphotApResid.c (modified) (2 diffs)
-
psphot/src/psphotChoosePSF.c (modified) (1 diff)
-
psphot/src/psphotCleanup.c (modified) (1 diff)
-
psphot/src/psphotLensing.c (copied) (copied from trunk/psphot/src/psphotLensing.c )
-
psphot/src/psphotReadout.c (modified) (2 diffs)
-
psphot/src/psphotStackImageLoop.c (modified) (1 prop)
-
psphot/src/psphotStackMatchPSFsNext.c (modified) (1 diff)
-
psphot/src/psphotStackReadout.c (modified) (1 diff)
-
pstamp/scripts/pstamp_insert_request.pl (modified) (3 diffs)
-
pstamp/scripts/pstampparse.pl (modified) (5 diffs)
-
tools/dlapstacks (modified) (1 diff)
-
tools/fixburntool (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140206
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20140206/ippScripts/scripts/dist_advancerun.pl
r35960 r36627 69 69 my $stacktool = can_run('stacktool') or (warn "Can't find stacktool" and $missing_tools = 1); 70 70 my $bgtool = can_run('bgtool') or (warn "Can't find bgtool" and $missing_tools = 1); 71 my $fftool = can_run('fftool') or (warn "Can't find fftool" and $missing_tools = 1); 71 72 my $staticskytool = can_run('staticskytool') or (warn "Can't find staticskytool" and $missing_tools = 1); 72 73 if ($missing_tools) { … … 77 78 78 79 my $tool_cmd; 80 my $tool_cmd2; 79 81 my $list_mode; 80 82 my $component_key; … … 127 129 $list_mode = "-diffskyfile"; 128 130 $component_key = "skycell_id"; 131 } elsif ($stage eq "ff") { 132 $tool_cmd = "$fftool -ff_id"; 133 $list_mode = "-result"; 134 $component_key = "dist_component"; 135 $tool_cmd2 = "$fftool -summary -ff_id" 129 136 } else { 130 137 &my_die("Unexpected stage: $stage", $dist_id, $PS_EXIT_CONFIG_ERROR); … … 132 139 133 140 $tool_cmd .= " $stage_id"; 141 $tool_cmd2 .= " $stage_id" if $tool_cmd2; 134 142 135 143 my $exportarg = '-exportrun'; … … 215 223 my $components = parse_md_list($metadata) or 216 224 &my_die("Unable to parse metadata list", $dist_id, $PS_EXIT_UNKNOWN_ERROR); 225 226 if ($tool_cmd2) { 227 my $command = "$tool_cmd2"; 228 $command .= " -dbname $dbname" if defined $dbname; 229 230 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 231 run(command => $command, verbose => $verbose); 232 unless ($success) { 233 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 234 &my_die("Unable to perform $command: $error_code", $dist_id, $error_code); 235 } 236 if (@$stdout_buf == 0) { 237 &my_die("Unable to perform $command: $error_code", $dist_id, $error_code); 238 } 239 my $metadata = $mdcParser->parse(join "", @$stdout_buf) or 240 &my_die("Unable to parse metadata config doc", $dist_id, $PS_EXIT_UNKNOWN_ERROR); 241 my $more_components = parse_md_list($metadata) or 242 &my_die("Unable to parse metadata list", $dist_id, $PS_EXIT_UNKNOWN_ERROR); 243 if (scalar @$more_components) { 244 push @$components, @$more_components; 245 } 246 } 217 247 218 248 open MANIFEST, ">$resolved" or -
branches/eam_branches/ipp-20140206/ippScripts/scripts/dist_bundle.pl
r36457 r36627 496 496 } elsif ($stage eq "stack") { 497 497 $type = $stack_cleaned{$rule}; 498 } elsif ($stage eq "sky" or $stage eq 'skycal' or $stage eq 'stack_summary' ) {498 } elsif ($stage eq "sky" or $stage eq 'skycal' or $stage eq 'stack_summary' or $stage eq 'ff') { 499 499 $type = $empty_cleaned{$rule}; 500 500 } else { … … 588 588 # stack_summary stage does not use a config dump file. 589 589 return build_stack_summary_file_list($path_base, \@file_list); 590 } elsif ($stage eq "ff") { 591 if ($component eq 'summary') { 592 # full force summary does not use a config dump file. Cobble together a file list 593 return build_ff_summary_file_list($path_base, \@file_list); 594 } else { 595 $config_file_rule = "PSPHOT.SKY.CONFIG"; 596 } 590 597 } else { 591 598 &my_die("$stage is not a valid stage", $component, $PS_EXIT_CONFIG_ERROR); … … 742 749 } 743 750 751 # psphotFullForceSummary does not produce a config dump file cobble together a file list 752 sub build_ff_summary_file_list { 753 my ($path_base, $file_list) = @_; 754 755 my %cmf ; 756 $cmf{file_rule} = "SOURCES"; 757 $cmf{name} = "$path_base.cmf"; 758 push @$file_list, \%cmf; 759 760 my %log; 761 $log{file_rule} = "LOG"; 762 $log{name} = "$path_base.log"; 763 push @$file_list, \%log; 764 765 return $file_list; 766 } 767 744 768 sub my_die 745 769 { -
branches/eam_branches/ipp-20140206/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140206/ippScripts/scripts/publish_file.pl
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140206/ippTasks/staticsky.pro
r34814 r36627 64 64 end 65 65 66 $RA_POLL_MAX = 0 67 68 macro set.ra.max 69 if ($0 != 2) 70 echo "USAGE: set.ra.max (ra_max_deg)" 71 break 72 end 73 $RA_POLL_MAX = $1 74 end 75 macro get.ra.max 76 echo $RA_POLL_MAX 77 end 78 66 79 ### Load tasks for staticsky 67 80 ### Tasks are loaded into staticskyResult. … … 80 93 if ($LABEL:n == 0) break 81 94 $run = staticskytool -todo 95 if ($RA_POLL_MAX > 0) 96 $run = $run -ra_max $RA_POLL_MAX 97 end 82 98 if ($DB:n == 0) 83 99 option DEFAULT -
branches/eam_branches/ipp-20140206/ippToPsps/jython/cleanup.py
r35311 r36627 87 87 self.logger.infoPair("To delete from DXLayer", "%d" % len(deleteFromDxLayerIDs)) 88 88 self.logger.infoPair("To delete from local disk", "%d" % len(deleteFromLocalIDs)) 89 89 # self.logger.infoPair("Did I get here", "yes?") 90 90 # delete stuff from local disk 91 91 if self.skychunk.deleteLocal: … … 110 110 111 111 self.reportResults("datastore", deleteFromDatastoreIDs, count) 112 112 # self.logger.infoPair("here","here") 113 113 # remove stuff from DXLayer 114 114 if self.skychunk.deleteDxLayer: 115 # self.logger.infoPair ("skip remove from dxlayer", "HAF") 115 116 count = 0 116 117 for id in deleteFromDxLayerIDs: 117 118 self.logger.infoPair("delete from dxlayer", id); 118 119 if self.dxlayer.deleteBatch(id): 120 self.logger.infoPair("delete dxlayer",id); 119 121 self.ippToPspsDb.updateDeletedDxlayer(id, 1) 120 122 count = count + 1 -
branches/eam_branches/ipp-20140206/ippToPsps/jython/dxlayer.py
r36098 r36627 37 37 38 38 if p.returncode != 0: 39 self.logger. debugPair("DXLayer webservice", "failed")39 self.logger.infoPair("DXLayer webservice", "failed") 40 40 return 0 41 41 else: 42 self.logger. debugPair("DXLayer webservice", "successful")42 self.logger.infoPair("DXLayer webservice", "successful") 43 43 44 44 ret = self.decodeDXLayerResponse(tempFile.name) … … 48 48 49 49 if ret: self.logger.infoPair("Deleted batch from DXLayer 1", batch) 50 else: self.logger. errorPair("Unable to delete batch from DXLayer 1" , batch)50 else: self.logger.infoPair("Unable to delete batch from DXLayer 1" , batch) 51 51 52 52 … … 61 61 62 62 if p.returncode != 0: 63 self.logger. debugPair("DXLayer webservice", "failed")63 self.logger.infoPair("DXLayer webservice", "failed") 64 64 return 0 65 65 else: … … 72 72 73 73 if ret: self.logger.infoPair("Deleted batch from DXLayer 2", batch) 74 else: self.logger. errorPair("Unable to delete batch from DXLayer 2" , batch)74 else: self.logger.infoPair("Unable to delete batch from DXLayer 2" , batch) 75 75 76 76 -
branches/eam_branches/ipp-20140206/ippToPsps/jython/odm.py
r35217 r36627 78 78 DETAILS = doc.find("{%s}OdmBatchState/{%s}Details" % (NAMESPACE, NAMESPACE)).text 79 79 results['DETAILS'] = DETAILS 80 elif re.search("processing", STATE): 80 elif re.search("processing", STATE): 81 81 loadedToODM = 1 82 82 if re.search("MergeWorthy", MESSAGE): … … 87 87 mergeWorthy = 1 88 88 merged = 1 89 # if re.search("released", STATE): 90 # loadedToODM = 1 91 # mergeWorthy = 1 92 # merged = 1 93 # if re.search("released", MESSAGE): 94 # loadedToODM = 1 95 # mergeWorthy = 1 96 # merged = 1 89 97 except: 90 98 pass -
branches/eam_branches/ipp-20140206/ippToPsps/perl/deleteFromDXLayer.pl
r36190 r36627 18 18 ); 19 19 20 my $dxWebServiceUrl = "http://lsb01.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi"; 20 #my $dxWebServiceUrl = "http://lsb01.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi"; 21 22 #my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb01/cgi-bin/dxwebservice.cgi"; 23 my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb01/cgi-bin/dxlayer/dxwebservice.cgi"; 24 25 21 26 #my $dxWebServiceUrl2 = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi"; 22 27 -
branches/eam_branches/ipp-20140206/ippToPsps/perl/deleteFromDXLayer2.pl
r36191 r36627 18 18 ); 19 19 20 my $dxWebServiceUrl = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi"; 20 #my $dxWebServiceUrl = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi"; 21 22 #my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb02/cgi-bin/dxwebservice.cgi"; 23 my $dxWebServiceUrl = "http://web02.psps.ifa.hawaii.edu/lsb02/cgi-bin/dxlayer/dxwebservice.cgi"; 21 24 #my $dxWebServiceUrl2 = "http://lsb02.psps.ifa.hawaii.edu/cgi-bin/dxlayer/dxwebservice.cgi"; 22 25 -
branches/eam_branches/ipp-20140206/ippTools/share/Makefile.am
r36536 r36627 105 105 detselect_search.sql \ 106 106 detselect_select.sql \ 107 detselect_show.sql \ 107 108 dettool_addprocessedexp.sql \ 108 109 dettool_childlessrun.sql \ … … 189 190 disttool_definebyquery_diff.sql \ 190 191 disttool_definebyquery_fake.sql \ 192 disttool_definebyquery_ff.sql \ 191 193 disttool_definebyquery_raw.sql \ 192 194 disttool_definebyquery_raw_no_magic.sql \ … … 206 208 disttool_pending_diff.sql \ 207 209 disttool_pending_fake.sql \ 210 disttool_pending_ff.sql \ 208 211 disttool_pending_raw.sql \ 209 212 disttool_pending_sky.sql \ … … 497 500 fftool_todo.sql \ 498 501 fftool_toadvance.sql \ 502 fftool_export_run.sql \ 503 fftool_export_input.sql \ 504 fftool_export_result.sql \ 505 fftool_export_summary.sql \ 499 506 remotetool_definebyquery_chip.sql \ 500 507 remotetool_definebyquery_cam.sql \ … … 502 509 remotetool_definebyquery_stack.sql \ 503 510 remotetool_updatepoll.sql 504 505 506 -
branches/eam_branches/ipp-20140206/ippTools/share/disttool_toadvance.sql
r35960 r36627 308 308 COUNT(diffSkyfile.skycell_id) = COUNT(distComponent.component) 309 309 AND SUM(distComponent.fault) = 0 310 UNION 311 -- ff stage 312 SELECT 313 distRun.dist_id, 314 stage, 315 stage_id, 316 outroot, 317 distRun.label, 318 clean 319 -- ,COUNT(warp_id) 320 -- ,COUNT(ff_id) 321 FROM distRun 322 JOIN fullForceRun ON stage_id = ff_id 323 JOIN fullForceResult USING(ff_id) 324 JOIN skycalRun USING(skycal_id) 325 JOIN stackRun USING(stack_id) 326 LEFT JOIN distComponent 327 ON distRun.dist_id = distComponent.dist_id 328 AND distComponent.component = CONCAT_WS('.', warp_id, stackRun.skycell_id) 329 WHERE 330 distRun.state = 'new' 331 AND distRun.fault = 0 332 AND distRun.stage = 'ff' 333 GROUP BY 334 distRun.dist_id, 335 ff_id 336 HAVING 337 -- number of dist components is the number of warps plus 1 (for the summary component) 338 COUNT(fullForceResult.ff_id) = COUNT(distComponent.component) 339 AND SUM(distComponent.fault) = 0 310 340 ) as Foo -
branches/eam_branches/ipp-20140206/ippTools/share/fftool_result.sql
r36441 r36627 1 1 SELECT 2 2 fullForceResult.*, 3 fullForceRun.s kycal_id,3 fullForceRun.state, 4 4 fullForceRun.label, 5 5 fullForceRun.data_group, 6 fullForceRun.skycal_id, 7 fullForceRun.workdir, 8 CONCAT_WS('.', warp_id, skycell_id) AS dist_component, 6 9 stackRun.tess_id, 7 10 stackRun.skycell_id, -
branches/eam_branches/ipp-20140206/ippTools/share/fftool_summary.sql
r36441 r36627 5 5 fullForceRun.data_group, 6 6 fullForceRun.skycal_id, 7 fullForceRun.workdir, 8 'summary' AS dist_component, 7 9 stackRun.tess_id, 8 10 stackRun.skycell_id, -
branches/eam_branches/ipp-20140206/ippTools/src
- Property svn:ignore
-
old new 48 48 releasetool 49 49 fftool 50 remotetool 51
-
- Property svn:ignore
-
branches/eam_branches/ipp-20140206/ippTools/src/detselect.c
r31058 r36627 29 29 static bool searchMode(pxConfig *config); 30 30 static bool selectMode(pxConfig *config); 31 static bool showMode(pxConfig *config); 32 31 33 32 34 # define MODECASE(caseName, func) \ … … 50 52 MODECASE(DETSELECT_MODE_SEARCH, searchMode); 51 53 MODECASE(DETSELECT_MODE_SELECT, selectMode); 54 MODECASE(DETSELECT_MODE_SHOW, showMode); 52 55 default: 53 56 psAbort("invalid option (this should not happen)"); … … 241 244 return true; 242 245 } 246 247 static bool showMode(pxConfig *config) 248 { 249 PS_ASSERT_PTR_NON_NULL(config, false); 250 251 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 252 253 psMetadata *where = psMetadataAlloc(); 254 255 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); 256 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 257 PXOPT_COPY_STR(config->args, where, "-det_type", "det_type", "=="); 258 PXOPT_COPY_STR(config->args, where, "-type", "det_type", "=="); 259 260 psString query = pxDataGet("detselect_show.sql"); 261 if (!query) { 262 psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement"); 263 return false; 264 } 265 266 // use psDBGenerateWhereConditionalSQL with AND ... because the SQL ends in a WHERE 267 if (where && psListLength(where->list)) { 268 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 269 psStringAppend(&query, " AND %s", whereClause); 270 psFree(whereClause); 271 } 272 psFree(where); 273 274 // we choose the single detrend image which matches all criteria and has 275 // the latest insertion date 276 277 psStringAppend(&query, " ORDER BY registered DESC, iteration DESC"); 278 279 if (!p_psDBRunQuery(config->dbh, query)) { 280 psError(PS_ERR_UNKNOWN, false, "database error"); 281 psFree(query); 282 return false; 283 } 284 psFree(query); 285 286 psArray *output = p_psDBFetchResult(config->dbh); 287 if (!output) { 288 psError(PS_ERR_UNKNOWN, false, "database error"); 289 return false; 290 } 291 if (!psArrayLength(output)) { 292 // XXX check psError here 293 psError(PS_ERR_UNKNOWN, false, "no detRun rows found"); 294 psFree(output); 295 return true; 296 } 297 298 // negative simple so the default is true 299 if (!ippdbPrintMetadatas(stdout, output, "detRun", !simple)) { 300 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 301 psFree(output); 302 return false; 303 } 304 305 psFree(output); 306 return(true); 307 } -
branches/eam_branches/ipp-20140206/ippTools/src/detselect.h
r18561 r36627 27 27 DETSELECT_MODE_SEARCH, 28 28 DETSELECT_MODE_SELECT, 29 DETSELECT_MODE_SHOW 29 30 } detselectMode; 30 31 -
branches/eam_branches/ipp-20140206/ippTools/src/detselectConfig.c
r18561 r36627 65 65 psMetadataAddStr(selectArgs, PS_LIST_TAIL, "-class_id", 0, "search by class ID", NULL); 66 66 psMetadataAddBool(selectArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 67 68 // -show 69 psMetadata *showArgs = psMetadataAlloc(); 70 psMetadataAddStr(showArgs, PS_LIST_TAIL, "-inst", 0, "search by camera", NULL); 71 psMetadataAddStr(showArgs, PS_LIST_TAIL, "-telescope", 0, "search by telescope", NULL); 72 psMetadataAddStr(showArgs, PS_LIST_TAIL, "-det_type", 0, "search by detrend type", NULL); 73 psMetadataAddStr(showArgs, PS_LIST_TAIL, "-type", 0, "search by detrend type (alias for -det_type)", NULL); 74 psMetadataAddBool(showArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 67 75 68 76 psMetadata *argSets = psMetadataAlloc(); … … 71 79 PXOPT_ADD_MODE("-search", "search for an appropriate detrend", DETSELECT_MODE_SEARCH, searchArgs); 72 80 PXOPT_ADD_MODE("-select", "retreive detrend information", DETSELECT_MODE_SELECT, selectArgs); 81 PXOPT_ADD_MODE("-show", "show all active detrends of this type with constraints", DETSELECT_MODE_SHOW, showArgs); 73 82 74 83 if (!pxGetOptions(stderr, argc, argv, config, modes, argSets)) { -
branches/eam_branches/ipp-20140206/ippTools/src/difftool.c
r36019 r36627 1349 1349 if (!mdok) { 1350 1350 psError(PXTOOLS_ERR_PROG, false, "exp_id not found"); 1351 if (!psDBRollback(config->dbh)) { 1352 psError(PS_ERR_UNKNOWN, false, "database error"); 1353 } 1354 return false; 1355 } 1356 psString warpDataGroup = psMetadataLookupStr(&mdok, row, "warpDataGroup"); 1357 if (!mdok) { 1358 psError(PXTOOLS_ERR_PROG, false, "warpDataGroup not found"); 1351 1359 if (!psDBRollback(config->dbh)) { 1352 1360 psError(PS_ERR_UNKNOWN, false, "database error"); … … 1391 1399 workdir, 1392 1400 label, 1393 data_group ? data_group : label,1401 data_group ? data_group : warpDataGroup, 1394 1402 dist_group, 1395 1403 reduction, -
branches/eam_branches/ipp-20140206/ippTools/src/disttool.c
r36248 r36627 413 413 414 414 magic = false; 415 } else if (!strcmp(stage, "ff")) { 416 runJoinStr = "fullForceRun.ff_id"; 417 query = pxDataGet("disttool_definebyquery_ff.sql"); 418 if (!query) { 419 psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement"); 420 psFree(where); 421 return(false); 422 } 423 424 if (label) { 425 psStringAppend(&query, " AND (fullForceRun.label = '%s') ", label); 426 } 427 if (dist_group) { 428 psStringAppend(&query, " AND (fullForceRun.dist_group = '%s') ", dist_group); 429 } 430 431 magic = false; 415 432 } else { 416 433 psError(PS_ERR_UNKNOWN, true, "unknown value for stage: %s", stage); -
branches/eam_branches/ipp-20140206/ippTools/src/fftool.c
r36441 r36627 44 44 static bool updatesummaryMode(pxConfig *config); 45 45 static bool summaryMode(pxConfig *config); 46 static bool exportrunMode(pxConfig *config); 47 static bool importrunMode(pxConfig *config); 48 static bool summaryMode(pxConfig *config); 46 49 47 50 static bool setfullForceRunState(pxConfig *config, psS64 sky_id, const char *state); … … 77 80 MODECASE(FFTOOL_MODE_UPDATESUMMARY, updatesummaryMode); 78 81 MODECASE(FFTOOL_MODE_SUMMARY, summaryMode); 82 MODECASE(FFTOOL_MODE_EXPORTRUN, exportrunMode); 83 MODECASE(FFTOOL_MODE_IMPORTRUN, importrunMode); 79 84 default: 80 85 psAbort("invalid option (this should not happen)"); … … 134 139 135 140 psMetadata *warpWhereMD = psMetadataAlloc(); 136 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_label", " warpRun.label", "LIKE");137 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_data_group"," warpRun.data_group", "LIKE");138 PXOPT_COPY_S64(config->args, warpWhereMD, "-select_warp_id", " warpRun.warp_id", "==");141 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_label", "fullForceRun.label", "LIKE"); 142 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_data_group","fullForceRun.data_group", "LIKE"); 143 PXOPT_COPY_S64(config->args, warpWhereMD, "-select_warp_id", "fullForceRun.warp_id", "=="); 139 144 if (!psListLength(warpWhereMD->list)) { 140 145 psError(PXTOOLS_ERR_CONFIG, false, "warp search parameters are required"); … … 150 155 } 151 156 152 PXOPT_COPY_STR(config->args, warpWhereMD, "-select_tess_id", " warpRun.tess_id", "==");153 pxAddLabelSearchArgs(config, warpWhereMD, "-select_filter", " warpRun.filter", "LIKE");157 PXOPT_COPY_STR(config->args, warpWhereMD, "-select_tess_id", "fullForceRun.tess_id", "=="); 158 pxAddLabelSearchArgs(config, warpWhereMD, "-select_filter", "fullForceRun.filter", "LIKE"); 154 159 if (!pxskycellAddWhere(config, warpWhereMD)) { 155 160 psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments"); … … 175 180 psString whereClause = psDBGenerateWhereConditionSQL(skycalWhereMD, NULL); 176 181 psStringAppend(&where, "\nAND %s", whereClause); 177 psStringAppend(&select, where);182 psStringAppend(&select, " %s", where); 178 183 psFree(whereClause); 179 184 psFree(skycalWhereMD); … … 504 509 PXOPT_COPY_STR(config->args, where, "-tess_id", "stackRun.tess_id", "LIKE"); 505 510 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "LIKE"); 511 PXOPT_COPY_STR(config->args, where, "-filter", "stackRun.filter", "LIKE"); 506 512 PXOPT_COPY_S16(config->args, where, "-fault", "staticskyResult.fault", "=="); 507 513 pxskycellAddWhere(config, where); … … 864 870 PXOPT_COPY_STR(config->args, where, "-tess_id", "stackRun.tess_id", "LIKE"); 865 871 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "LIKE"); 872 PXOPT_COPY_STR(config->args, where, "-filter", "stackRun.filter", "LIKE"); 866 873 PXOPT_COPY_S16(config->args, where, "-fault", "staticskyResult.fault", "=="); 867 874 pxskycellAddWhere(config, where); … … 933 940 return true; 934 941 } 942 943 bool exportrunMode(pxConfig *config) 944 { 945 typedef struct ExportTable { 946 char tableName[80]; 947 char sqlFilename[80]; 948 } ExportTable; 949 950 PS_ASSERT_PTR_NON_NULL(config, NULL); 951 952 // PXOPT_LOOKUP_S64(det_id, config->args, "-warp_id", true, false); 953 PXOPT_LOOKUP_STR(outfile, config->args, "-outfile", true, false); 954 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 955 // PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false); 956 957 FILE *f = fopen (outfile, "w"); 958 if (f == NULL) { 959 psError(PS_ERR_UNKNOWN, false, "failed to open output file"); 960 return false; 961 } 962 963 if (!pxExportVersion(config, f)) { 964 psError(PS_ERR_UNKNOWN, false, "failed to write dbversion output file"); 965 return false; 966 } 967 psMetadata *where = psMetadataAlloc(); 968 PXOPT_COPY_S64(config->args, where, "-ff_id", "ff_id", "=="); 969 970 ExportTable tables [] = { 971 {"fullForceRun", "fftool_export_run.sql"}, 972 {"fullForceInput", "fftool_export_input.sql"}, 973 {"fullForceResult", "fftool_export_result.sql"}, 974 {"fullForceSummary", "fftool_export_summary.sql"}, 975 }; 976 977 int numTables = sizeof(tables)/sizeof(tables[0]); 978 979 for (int i=0; i < numTables; i++) { 980 psString query = pxDataGet(tables[i].sqlFilename); 981 if (!query) { 982 psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement"); 983 return false; 984 } 985 986 if (where && psListLength(where->list)) { 987 psString whereClause = psDBGenerateWhereSQL(where, NULL); 988 psStringAppend(&query, " %s", whereClause); 989 psFree(whereClause); 990 } 991 992 // treat limit == 0 as "no limit" 993 if (limit) { 994 psString limitString = psDBGenerateLimitSQL(limit); 995 psStringAppend(&query, " %s", limitString); 996 psFree(limitString); 997 } 998 999 if (!p_psDBRunQuery(config->dbh, query)) { 1000 psError(PS_ERR_UNKNOWN, false, "database error"); 1001 psFree(query); 1002 return false; 1003 } 1004 psFree(query); 1005 1006 psArray *output = p_psDBFetchResult(config->dbh); 1007 if (!output) { 1008 psError(PS_ERR_UNKNOWN, false, "database error"); 1009 return false; 1010 } 1011 if (!psArrayLength(output)) { 1012 psError(PS_ERR_UNKNOWN, true, "no rows found"); 1013 psFree(output); 1014 return false; 1015 } 1016 1017 // we must write the export table in non-simple (true) format 1018 if (!ippdbPrintMetadatas(f, output, tables[i].tableName, true)) { 1019 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 1020 psFree(output); 1021 return false; 1022 } 1023 psFree(output); 1024 } 1025 1026 fclose (f); 1027 1028 return true; 1029 } 1030 1031 bool importrunMode(pxConfig *config) 1032 { 1033 unsigned int nFail; 1034 1035 int numImportTables = 3; 1036 1037 char tables[3] [80] = {"fullForceInput", "fullForceResult", "fullForceSummary"}; 1038 1039 PS_ASSERT_PTR_NON_NULL(config, NULL); 1040 1041 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1042 1043 psMetadata *input = psMetadataConfigRead (NULL, &nFail, infile, false); 1044 1045 #ifdef notdef 1046 fprintf (stderr, "---- input ----\n"); 1047 psMetadataPrint (stderr, input, 1); 1048 #endif 1049 1050 if (!pxCheckImportVersion(config, input)) { 1051 psError(PS_ERR_UNKNOWN, false, "pxCheckImportVersion failed"); 1052 return false; 1053 } 1054 1055 psMetadataItem *item = psMetadataLookup (input, "fullForceRun"); 1056 psAssert (item, "entry not in input?"); 1057 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1058 1059 psMetadataItem *entry = psListGet (item->data.list, 0); 1060 assert (entry); 1061 assert (entry->type == PS_DATA_METADATA); 1062 fullForceRunRow *fullForceRun = fullForceRunObjectFromMetadata (entry->data.md); 1063 fullForceRunInsertObject (config->dbh, fullForceRun); 1064 1065 // fprintf (stdout, "---- warp run ----\n"); 1066 // psMetadataPrint (stderr, entry->data.md, 1); 1067 1068 for (int i = 0; i < numImportTables; i++) { 1069 item = psMetadataLookup (input, tables[i]); 1070 psAssert (item, "entry not in input?"); 1071 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1072 1073 switch (i) { 1074 case 0: 1075 for (int i = 0; i < item->data.list->n; i++) { 1076 entry = psListGet (item->data.list, i); 1077 assert (entry); 1078 assert (entry->type == PS_DATA_METADATA); 1079 fullForceInputRow *fullForceInput = fullForceInputObjectFromMetadata (entry->data.md); 1080 fullForceInputInsertObject (config->dbh, fullForceInput); 1081 1082 // fprintf (stdout, "---- row %d ----\n", i); 1083 // psMetadataPrint (stderr, entry->data.md, 1); 1084 } 1085 break; 1086 1087 case 1: 1088 for (int i = 0; i < item->data.list->n; i++) { 1089 entry = psListGet (item->data.list, i); 1090 assert (entry); 1091 assert (entry->type == PS_DATA_METADATA); 1092 fullForceResultRow *fullForceResult = fullForceResultObjectFromMetadata (entry->data.md); 1093 fullForceResultInsertObject (config->dbh, fullForceResult); 1094 1095 // fprintf (stdout, "---- row %d ----\n", i); 1096 // psMetadataPrint (stderr, entry->data.md, 1); 1097 } 1098 break; 1099 1100 case 2: 1101 for (int i = 0; i < item->data.list->n; i++) { 1102 entry = psListGet (item->data.list, i); 1103 assert (entry); 1104 assert (entry->type == PS_DATA_METADATA); 1105 fullForceSummaryRow *fullForceSummary = fullForceSummaryObjectFromMetadata (entry->data.md); 1106 fullForceSummaryInsertObject (config->dbh, fullForceSummary); 1107 1108 // fprintf (stdout, "---- row %d ----\n", i); 1109 // psMetadataPrint (stderr, entry->data.md, 1); 1110 } 1111 break; 1112 } 1113 } 1114 return true; 1115 } -
branches/eam_branches/ipp-20140206/ippTools/src/fftool.h
r36441 r36627 36 36 FFTOOL_MODE_REVERTSUMMARY, 37 37 FFTOOL_MODE_UPDATESUMMARY, 38 FFTOOL_MODE_SUMMARY 38 FFTOOL_MODE_SUMMARY, 39 FFTOOL_MODE_EXPORTRUN, 40 FFTOOL_MODE_IMPORTRUN, 39 41 } fftoolMode; 40 42 -
branches/eam_branches/ipp-20140206/ippTools/src/fftoolConfig.c
r36441 r36627 186 186 pxskycellAddArguments(revertsummaryArgs); 187 187 188 // -exportrun 189 psMetadata *exportrunArgs = psMetadataAlloc(); 190 psMetadataAddS64(exportrunArgs, PS_LIST_TAIL, "-ff_id", 0, "export this full force ID (required)", 0); 191 psMetadataAddStr(exportrunArgs, PS_LIST_TAIL, "-outfile", 0, "export to this file (required)", NULL); 192 psMetadataAddU64(exportrunArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 193 // psMetadataAddBool(exportrunArgs, PS_LIST_TAIL, "-clean", 0, "export run in cleaned state", false); 194 195 // -importrun 196 psMetadata *importrunArgs = psMetadataAlloc(); 197 psMetadataAddStr(importrunArgs, PS_LIST_TAIL, "-infile", 0, "import from this file (required)", NULL); 198 199 200 188 201 psFree(now); 189 202 … … 203 216 PXOPT_ADD_MODE("-revertsummary", "revert faulted summary", FFTOOL_MODE_REVERTSUMMARY, revertsummaryArgs); 204 217 PXOPT_ADD_MODE("-summary", "list summary results", FFTOOL_MODE_SUMMARY, summaryArgs); 218 PXOPT_ADD_MODE("-exportrun", "list summary results", FFTOOL_MODE_EXPORTRUN, exportrunArgs); 219 PXOPT_ADD_MODE("-importrun", "list summary results", FFTOOL_MODE_IMPORTRUN, importrunArgs); 205 220 206 221 if (!pxGetOptions(stderr, argc, argv, config, modes, argSets)) { -
branches/eam_branches/ipp-20140206/ippTools/src/laptool.c
r35568 r36627 1170 1170 // we only want projection cells which do not already of an entry 1171 1171 psStringAppend(&query, "\nWHERE lapGroup.projection_cell IS NULL\n"); 1172 psStringAppend(&query, "\nORDER by projection_cell\n"); 1172 // Projection cell's don't have a convienient order. Queue runs in the order of lap_id 1173 // psStringAppend(&query, "\nORDER by projection_cell\n"); 1174 psStringAppend(&query, "\nORDER by lap_id_0\n"); 1173 1175 1174 1176 if (limit) { … … 1289 1291 psFree(whereClause); 1290 1292 } 1293 psStringAppend(&query, "\nGROUP by projection_cell ORDER by MIN(lap_id)"); 1291 1294 if (limit) { 1292 1295 psString limitString = psDBGenerateLimitSQL(limit); -
branches/eam_branches/ipp-20140206/ippTools/src/remotetool.c
r36536 r36627 149 149 psFree(limitString); 150 150 } 151 if (!p_psDBRunQuery F(config->dbh, query)) {151 if (!p_psDBRunQuery(config->dbh, query)) { 152 152 psError(PS_ERR_UNKNOWN, false, "database error"); 153 153 psFree(query); … … 313 313 { 314 314 PS_ASSERT_PTR_NON_NULL(config, false); 315 PXOPT_LOOKUP_S64(remote_id, config->args, "-remote_id", true, false);315 // PXOPT_LOOKUP_S64(remote_id, config->args, "-remote_id", true, false); 316 316 317 317 psMetadata *where = psMetadataAlloc(); … … 341 341 { 342 342 PS_ASSERT_PTR_NON_NULL(config, false); 343 PXOPT_LOOKUP_S64(remote_id, config->args, "-remote_id", true, false);343 // PXOPT_LOOKUP_S64(remote_id, config->args, "-remote_id", true, false); 344 344 345 345 psMetadata *where = psMetadataAlloc(); -
branches/eam_branches/ipp-20140206/ippconfig/recipes/filerules-split.mdc
r36441 r36627 303 303 SKYCELL.TEMPLATE OUTPUT {OUTPUT}.skycell SKYCELL NONE FPA TRUE NONE 304 304 305 PPSUB.OUTPUT OUTPUT {OUTPUT}.fits IMAGE COMP_SUBFPA TRUE NONE305 PPSUB.OUTPUT OUTPUT {OUTPUT}.fits IMAGE NONE FPA TRUE NONE 306 306 PPSUB.OUTPUT.MASK OUTPUT {OUTPUT}.mask.fits MASK COMP_MASK FPA TRUE NONE 307 307 PPSUB.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits VARIANCE COMP_WT FPA TRUE NONE … … 311 311 PPSUB.OUTPUT.JPEG2 OUTPUT {OUTPUT}.b2.jpg JPEG NONE FPA TRUE NONE 312 312 PPSUB.OUTPUT.RESID.JPEG OUTPUT {OUTPUT}.res.jpg JPEG NONE FPA TRUE NONE 313 PPSUB.INVERSE OUTPUT {OUTPUT}.inv.fits IMAGE COMP_SUBFPA TRUE NONE313 PPSUB.INVERSE OUTPUT {OUTPUT}.inv.fits IMAGE NONE FPA TRUE NONE 314 314 PPSUB.INVERSE.MASK OUTPUT {OUTPUT}.inv.mask.fits MASK COMP_MASK FPA TRUE NONE 315 315 PPSUB.INVERSE.VARIANCE OUTPUT {OUTPUT}.inv.wt.fits VARIANCE COMP_WT FPA TRUE NONE -
branches/eam_branches/ipp-20140206/ippconfig/recipes/ppSub.config
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140206/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140206/ppBackground/src/Makefile.am
r28281 r36627 1 bin_PROGRAMS = ppBackground 1 bin_PROGRAMS = ppBackground ppBackgroundStack 2 2 3 3 if HAVE_SVNVERSION … … 28 28 ppBackground_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PPSTATS_LIBS) $(PSPHOT_LIBS) $(PPBACKGROUND_LIBS) 29 29 30 ppBackgroundStack_CPPFLAGS = $(ppBackground_CPPFLAGS) 31 ppBackgroundStack_LDFLAGS = $(ppBackground_LDFLAGS) 32 30 33 ppBackground_SOURCES = \ 31 34 ppBackground.c \ … … 38 41 ppBackgroundErrorCodes.c \ 39 42 ppBackgroundExit.c 43 44 ppBackgroundStack_SOURCES = \ 45 ppBackgroundStack.c \ 46 ppBackgroundStackArguments.c \ 47 ppBackgroundStackCamera.c \ 48 ppBackgroundStackData.c \ 49 ppBackgroundStackLoop.c \ 50 ppBackgroundStackMath.c \ 51 ppBackgroundVersion.c \ 52 ppBackgroundErrorCodes.c \ 53 ppBackgroundExit.c 54 40 55 41 56 noinst_HEADERS = \ -
branches/eam_branches/ipp-20140206/ppBackground/src/ppBackground.c
r28280 r36627 18 18 ppBackgroundErrorRegister(); 19 19 20 printf("Initializing data\n"); 20 21 ppBackgroundData *data = ppBackgroundDataInit(&argc, argv); 21 22 if (!data) { 22 23 goto DIE; 23 24 } 24 25 printf("Reading Arguments\n"); 25 26 if (!ppBackgroundArguments(data, argc, argv)) { 26 27 goto DIE; 27 28 } 28 29 printf("Setting up Camera\n"); 29 30 if (!ppBackgroundCamera(data)) { 30 31 goto DIE; 31 32 } 32 33 34 printf("Looping over data!\n"); 33 35 if (!ppBackgroundLoop(data)) { 34 36 goto DIE; -
branches/eam_branches/ipp-20140206/ppStack/src/ppStackReadout.c
r34800 r36627 184 184 psFree(stack); 185 185 186 psLogMsg("ppStack", PS_LOG_INFO, "initial stack image sectionNum %d", sectionNum); 187 186 188 sectionNum++; 187 189 … … 293 295 psFree(stack); 294 296 297 psLogMsg("ppStack", PS_LOG_INFO, "final stack image sectionNum %d", sectionNum); 298 295 299 sectionNum++; 296 300 -
branches/eam_branches/ipp-20140206/ppSub/src/ppSubMatchPSFs.c
r36441 r36627 156 156 psLogMsg("ppSub", PS_LOG_INFO, "Input FWHM: %f\nReference FWHM: %f\n", inFWHM, refFWHM); 157 157 if (!isfinite(inFWHM) || !isfinite(refFWHM)) { 158 #ifdef SET_QUALITY_INSTEAD_OF_ERROR 158 159 psErrorStackPrint(stderr, "Cannot determine FHWM for images, giving up."); 159 160 int error = psErrorCodeLast(); // Error code 160 161 ppSubDataQuality(data, error, PPSUB_FILES_ALL); 161 162 return true; 163 #else 164 psError(PPSUB_ERR_DATA, false, "Cannot determine FHWM for images, giving up."); 165 return false; 166 #endif 162 167 } 163 168 -
branches/eam_branches/ipp-20140206/psLib/src/fits/psFitsImage.c
r33645 r36627 753 753 } 754 754 755 // If there is no options set, remove all our non-standard keywords, because no one asked for them. 756 if (!options) { 757 if (psMetadataLookup(header,"BOFFSET")) { 758 psMetadataRemoveKey(header,"BOFFSET"); 759 } 760 if (psMetadataLookup(header,"BSOFTEN")) { 761 psMetadataRemoveKey(header,"BSOFTEN"); 762 } 763 } 764 755 765 // write the header, if any. 756 766 if (header && !psFitsWriteHeaderImage(fits, header, createPHU)) { -
branches/eam_branches/ipp-20140206/psphot/src
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20140214/psphot/src merged eligible /branches/eam_branches/ipp-20140226/psphot/src merged eligible /tags/ipp-20140114/psphot/src merged eligible /trunk/psphot/src merged eligible
-
Property svn:mergeinfo
set to
-
branches/eam_branches/ipp-20140206/psphot/src/Makefile.am
r36441 r36627 208 208 psphotMakeGrowthCurve.c \ 209 209 psphotMagnitudes.c \ 210 psphotLensing.c \ 210 211 psphotSetMaskBits.c \ 211 212 psphotSkyReplace.c \ -
branches/eam_branches/ipp-20140206/psphot/src/psphot.h
r36441 r36627 144 144 bool psphotMagnitudesReadout(pmConfig *config, psMetadata *recipe, const pmFPAview *view, pmReadout *readout, psArray *sources, pmPSF *psf); 145 145 bool psphotMagnitudes_Threaded (psThreadJob *job); 146 147 bool psphotLensing (pmConfig *config, const pmFPAview *view, const char *filerule); 148 bool psphotLensingReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 149 bool psphotLensingPSFtrendsReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 146 150 147 151 bool psphotEfficiency (pmConfig *config, const pmFPAview *view, const char *filerule); -
branches/eam_branches/ipp-20140206/psphot/src/psphotApResid.c
r34404 r36627 214 214 215 215 // XXX make this user-configurable? 216 if (source->psfMagErr > 0.0 1) continue;216 if (source->psfMagErr > 0.03) continue; 217 217 218 218 // aperture residual for this source … … 267 267 268 268 // set the max order (0 = constant) which the number of psf stars can support: 269 // rule of thumb: require 3 stars per 'cell' (order+1)^2269 // we require only 3 stars for n = 0, increase stars / cell for higher order 270 270 int MaxOrderForStars = 0; 271 if (Npsf >= 12) MaxOrderForStars = 1; // 4 cells 272 if (Npsf >= 27) MaxOrderForStars = 2; // 9 cells 273 if (Npsf >= 48) MaxOrderForStars = 3; // 16 cells 274 if (Npsf > 75) MaxOrderForStars = 4; // 25 cells 271 if (Npsf >= 16) MaxOrderForStars = 1; // 4 cells 272 if (Npsf >= 54) MaxOrderForStars = 2; // 9 cells 273 if (Npsf >= 128) MaxOrderForStars = 3; // 16 cells 274 if (Npsf >= 300) MaxOrderForStars = 4; // 25 cells 275 if (Npsf > 576) MaxOrderForStars = 5; // 36 cells 275 276 276 277 pmTrend2DMode mode = PM_TREND_MAP; -
branches/eam_branches/ipp-20140206/psphot/src/psphotChoosePSF.c
r35769 r36627 399 399 char *modelName = pmModelClassGetName (psf->type); 400 400 psLogMsg ("psphot.pspsf", PS_LOG_WARN, "select psf model: %f sec\n", psTimerMark ("psphot.choose.psf")); 401 psLogMsg ("psphot.pspsf", PS_LOG_INFO, "psf model %s, ApResid: %f +/- %f \n", modelName, psf->ApResid, psf->dApResid);401 psLogMsg ("psphot.pspsf", PS_LOG_INFO, "psf model %s, ApResid: %f +/- %f (%d x %d model)\n", modelName, psf->ApResid, psf->dApResid, psf->trendNx, psf->trendNy); 402 402 403 403 psFree (options); -
branches/eam_branches/ipp-20140206/psphot/src/psphotCleanup.c
r34086 r36627 22 22 pmVisualCleanup (); 23 23 psLibFinalize(); 24 #if (PS_TRACE_ON) 25 // don't display memory leaks unless trace is on. 24 26 // fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "psphot"); 25 27 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "psphot"); 28 #endif 26 29 return; 27 30 } -
branches/eam_branches/ipp-20140206/psphot/src/psphotReadout.c
r36375 r36627 340 340 // calculate source magnitudes 341 341 if (!psphotMagnitudes(config, view, filerule)) { // pass 1 (detections->allSources) 342 psErrorStackPrint(stderr, "Unable to do magnitudes.");342 psErrorStackPrint(stderr, "Unable to do magnitudes."); 343 343 psErrorClear(); 344 344 } 345 346 // calculate lensing parameters 347 if (!psphotLensing(config, view, filerule)) { 348 psErrorStackPrint(stderr, "Unable to do lensing parameters."); 349 psErrorClear(); 350 } 351 345 352 if (!psphotEfficiency(config, view, filerule)) { // pass 1 346 353 psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources"); … … 353 360 // replace background in residual image 354 361 if (!psphotSkyReplace (config, view, filerule)) { // pass 1 355 psErrorStackPrint(stderr, "Unable to replace sky");356 psErrorClear();362 psErrorStackPrint(stderr, "Unable to replace sky"); 363 psErrorClear(); 357 364 } 358 365 359 366 // drop the references to the image pixels held by each source 360 367 if (!psphotSourceFreePixels (config, view, filerule)) { // pass 1 361 psErrorStackPrint(stderr, "Unable to free source pixels");362 psErrorClear();368 psErrorStackPrint(stderr, "Unable to free source pixels"); 369 psErrorClear(); 363 370 } 364 371 -
branches/eam_branches/ipp-20140206/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140206/psphot/src/psphotStackMatchPSFsNext.c
r36128 r36627 105 105 psLogMsg ("psphot", PS_LOG_INFO, "target FWHM (%f) is smaller than current FWHM (%f), not smoothing\n", targetFWHM, currentFWHM); 106 106 fwhmValues->data.F32[lastSize + 1] = currentFWHM; 107 pmReadoutMaskInvalid(readout, maskVal, maskSat); 107 108 return false; 108 109 } -
branches/eam_branches/ipp-20140206/psphot/src/psphotStackReadout.c
r36375 r36627 391 391 392 392 // re-measure the PSF for the smoothed image (using entries in 'allSources') 393 psphotChoosePSF (config, view, STACK_OUT, false); 393 if (!psphotChoosePSF (config, view, STACK_OUT, false)) { 394 psLogMsg ("psphot", 3, "failure to construct a psf model in radial aperture loop for entry :%d", entry); 395 return psphotReadoutCleanup (config, view, STACK_RAW); 396 } 394 397 395 398 // this is necessary to update the models based on the new PSF -
branches/eam_branches/ipp-20140206/pstamp/scripts/pstamp_insert_request.pl
r35487 r36627 45 45 my $pstamptool = can_run('pstamptool') or (warn "Can't find pstamptool" and $missing_tools = 1); 46 46 my $fields = can_run('fields') or (warn "Can't find fields" and $missing_tools = 1); 47 my $fhead = can_run('fhead') or (warn "Can't find fhead" and $missing_tools = 1); 47 48 48 49 if ($missing_tools) { … … 56 57 # Note that if it's a pstamp request then REQ_NAME should be defined. 57 58 # if it's a detectability query it will not have a REQ_NAME but will have a QUERY_ID 58 my $command = "echo $tmp_req_file | $fields -x 0 EXTNAME EXTVER REQ_NAME QUERY_ID"; 59 # my $command = "echo $tmp_req_file | $fields -x 0 EXTNAME EXTVER REQ_NAME QUERY_ID"; 60 my $command = "$fhead -x 0 $tmp_req_file"; 59 61 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 60 62 run(command => $command, verbose => $verbose); 61 if (0) {62 # stoopid fields doesn't set exit status to zero when it works63 63 unless ($success) { 64 64 print STDERR @$stderr_buf; 65 65 exit $error_code >> 8; 66 66 } 67 }68 67 my $output = join "", @$stdout_buf; 69 (undef, $extname, $extver, $req_name) = split " ", $output; 68 69 70 my $makehash = 0; 71 my %hash; 72 foreach my $line (split "\n", $output) { 73 chomp $line; 74 # split lines inte left and right using equals sign. left is the keyword 75 my ($key, $right) = split "=", $line; 76 # skip if there was no '=' 77 next if !$right; 78 79 $key =~ s/ //g; 80 81 # separate value from comment 82 my ($value, $comment) = split "/", $right; 83 # remove ' and space characters from key and value 84 $value =~ s/'//g; 85 $value =~ s/ //g; 86 87 # print "$key $value\n"; 88 89 # extract the values that we are looking for 90 $extname = $value if ($key eq "EXTNAME"); 91 $extver = $value if ($key eq "EXTVER"); 92 $req_name = $value if ($key eq "REQ_NAME"); 93 $req_name = $value if ($key eq "QUERY_ID"); 94 95 # optionally build hash. Duplicate keys get the last value seen 96 if ($makehash) { 97 $hash{$key} = $value; 98 } 99 } 100 101 # (undef, $extname, $extver, $req_name) = split " ", $output; 102 70 103 if (!$extname or ! (($extname eq "PS1_PS_REQUEST") or ($extname eq "MOPS_DETECTABILITY_QUERY"))) { 71 104 print STDERR "invalid request file\n"; 105 print "invalid request file\n"; 72 106 exit $PS_EXIT_DATA_ERROR; 73 107 } 108 74 109 if (!defined $req_name) { 75 110 print STDERR "invalid request file no REQ_NAME or QUERY_ID\n"; 111 print "invalid request file no REQ_NAME or QUERY_ID\n"; 112 exit $PS_EXIT_DATA_ERROR; 113 } 114 if (!defined $extver) { 115 print STDERR "invalid request file no EXTVER found\n"; 116 print "invalid request file no EXTVER found\n"; 76 117 exit $PS_EXIT_DATA_ERROR; 77 118 } … … 119 160 120 161 exit 0; 162 121 163 # Ask the database for the next web request number 122 164 sub get_webreq_num -
branches/eam_branches/ipp-20140206/pstamp/scripts/pstampparse.pl
r36165 r36627 243 243 my $watch_for_big_requests = (!($label =~ /BIG/) and ($label =~ /PSI/ or $label =~ /WEB/)); 244 244 245 my $big_limit = 100; # XXX: this should be in a configuration file somewhere not hard coded 245 # XXX: these should be in a configuration file somewhere not hard coded 246 my $big_limit = 100; 247 my $job_big_limit = 400; 246 248 247 249 if ($watch_for_big_requests and $nRows > $big_limit) { … … 267 269 268 270 # see whether number of jobs limit for high priority request was exceeded 269 if ($watch_for_big_requests and $num_jobs > $ big_limit) {271 if ($watch_for_big_requests and $num_jobs > $job_big_limit) { 270 272 $label = change_to_lower_priority_label($label); 271 273 $watch_for_big_requests = 0; … … 311 313 my $rownum = $row->{ROWNUM}; 312 314 if (!validID($rownum)) { 315 $rownum = 'NULL' if !defined $rownum; 313 316 print STDERR "$rownum is not a valid ROWNUM\n"; 314 317 insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST); … … 316 319 } 317 320 my $job_type = $row->{JOB_TYPE}; 318 if (($job_type ne "stamp") and ($job_type ne "get_image")) { 321 if (!defined $job_type || (($job_type ne "stamp") and ($job_type ne "get_image"))) { 322 $job_type = 'NULL' if !defined $job_type; 319 323 print STDERR "$job_type is not a valid JOB_TYPE\n"; 320 324 insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST); … … 325 329 if (($req_type ne "byid") and ($req_type ne "bycoord") and ($req_type ne "byexp") and 326 330 ($req_type ne "byskycell") and ($req_type ne "bydiff")) { 331 $req_type = 'NULL' if !defined $req_type; 327 332 print STDERR "$req_type is not a valid REQ_TYPE\n"; 328 333 insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST); -
branches/eam_branches/ipp-20140206/tools/dlapstacks
r34358 r36627 14 14 15 15 my $label; 16 my $label1 = 'LAP.ThreePi.201 20706';17 my $label2 = 'LAP.ThreePi.201 10809';16 my $label1 = 'LAP.ThreePi.20130717'; 17 my $label2 = 'LAP.ThreePi.20120706'; 18 18 my $tess_id = 'RINGS.V3'; 19 19 -
branches/eam_branches/ipp-20140206/tools/fixburntool
r36045 r36627 107 107 { 108 108 my $command = "$burntool --exp_id $exp_id --class_id $class_id --this_uri $uri --previous_uri $prev_uri"; 109 $command .= " --verbose" if $verbose; 109 110 print "$command\n"; 110 111 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note:
See TracChangeset
for help on using the changeset viewer.
