Changeset 34794
- Timestamp:
- Dec 11, 2012, 11:15:37 AM (14 years ago)
- Location:
- tags/ipp-20121026
- Files:
-
- 10 edited
-
dbconfig/changes.txt (modified) (1 diff, 1 prop)
-
dbconfig/staticsky.md (modified) (1 diff, 1 prop)
-
ippScripts/scripts/skycalibration.pl (modified) (5 diffs, 1 prop)
-
ippScripts/scripts/staticsky.pl (modified) (1 prop)
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 diff, 1 prop)
-
ippTools/share/staticskytool_pendingskycalrun.sql (modified) (1 prop)
-
ippTools/src/staticskytool.c (modified) (8 diffs, 1 prop)
-
ippTools/src/staticskytoolConfig.c (modified) (4 diffs, 1 prop)
-
ippconfig/recipes/ppStats.config (modified) (1 diff, 1 prop)
-
ippconfig/recipes/ppStatsFromMetadata.config (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20121026/dbconfig/changes.txt
- Property svn:mergeinfo set to
r34740 r34794 2262 2262 2263 2263 UPDATE dbversion set schema_version = '1.1.72', updated= CURRENT_TIMESTAMP(); 2264 2265 ALTER TABLE skycalResult ADD column n_forced INT after n_extended; 2266 UPDATE dbversion set schema_version = '1.1.73', updated= CURRENT_TIMESTAMP(); -
tags/ipp-20121026/dbconfig/staticsky.md
- Property svn:mergeinfo set to
r34740 r34794 56 56 n_detections S32 0 57 57 n_extended S32 0 58 n_forced S32 0 58 59 zpt_obs F32 0.0 59 60 zpt_stdev F32 0.0 -
tags/ipp-20121026/ippScripts/scripts/skycalibration.pl
- Property svn:mergeinfo changed
/trunk/ippScripts/scripts/skycalibration.pl merged: 34792
r34739 r34794 134 134 # First check the expected file name where the stack_id is the FILE_ID 135 135 my $file; 136 if (!$singlefilter) { 136 # if (!$singlefilter) { 137 if (1) { 138 137 139 $file = $ipprc->filename('PSPHOT.STACK.OUTPUT', $path_base, $stack_id); 138 140 if (! $ipprc->file_resolve($file)) { 139 # XXX: Beginning of section that can be removed eventually140 141 # no file with the expected name found142 # assume that the input is from an early staticsky run that did not use stack_id as the FILE_ID143 # but instead used FILE_ID = [0 .. num_filters-1]144 141 print "\nfailed to resolve $file\n"; 145 if (!$filter) { 146 &my_die("filter not supplied unable to identify appropriate staticsky input.", $skycal_id, $PS_EXIT_SYS_ERROR); 147 } 148 print "Trying old style FILE_ID\n"; 149 my $max_filters = 5; 150 for (my $i=0; $i < $max_filters; $i++) { 151 my $file_id = sprintf "%03d", $i; 152 $file = $ipprc->filename('PSPHOT.STACK.OUTPUT', $path_base, $file_id); 153 my $resolved = $ipprc->file_resolve($file); 154 if (!$resolved) { 155 # we fail here assumming that if file_id N doesn't exist, neither to N+1 156 print "\nfailed to resolve $file\n\n"; 157 &my_die("unable to identify appropriate staticsky input.", $skycal_id, $PS_EXIT_SYS_ERROR); 142 # file with proper file rule not found. Try older systems 143 if ($singlefilter) { 144 # input is from a single filter static sky run which used psphot instead of psphotStack 145 # The file rule is different for psphot 146 $file = $ipprc->filename('PSPHOT.OUT.CMF.MEF', $path_base); 147 &my_die("Unable to find input for $stack_id $filter", $skycal_id, $PS_EXIT_SYS_ERROR) 148 unless $ipprc->file_exists($file); 149 } else { 150 # XXX: Beginning of section that can be removed eventually 151 # no file with the expected name found 152 # assume that the input is from an early multifilter staticsky run that did not use stack_id as the FILE_ID 153 # but instead used FILE_ID = [0 .. num_filters-1] 154 if (!$filter) { 155 &my_die("filter not supplied unable to identify appropriate staticsky input.", $skycal_id, $PS_EXIT_SYS_ERROR); 158 156 } 159 # Check the filter id for this file 160 my $command = "$fhead $resolved | grep FILTERID"; 161 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 162 run(command => $command, verbose => 0); 163 unless ($success) { 164 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 165 &my_die("Unable to perform $command: $error_code", $skycal_id, $PS_EXIT_SYS_ERROR); 157 print "Trying old style FILE_ID\n"; 158 my $max_filters = 5; 159 for (my $i=0; $i < $max_filters; $i++) { 160 my $file_id = sprintf "%03d", $i; 161 $file = $ipprc->filename('PSPHOT.STACK.OUTPUT', $path_base, $file_id); 162 my $resolved = $ipprc->file_resolve($file); 163 if (!$resolved) { 164 # we fail here assumming that if file_id N doesn't exist, neither to N+1 165 print "\nfailed to resolve $file\n\n"; 166 &my_die("unable to identify appropriate staticsky input.", $skycal_id, $PS_EXIT_SYS_ERROR); 167 } 168 # Check the filter id for this file 169 my $command = "$fhead $resolved | grep FILTERID"; 170 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 171 run(command => $command, verbose => 0); 172 unless ($success) { 173 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 174 &my_die("Unable to perform $command: $error_code", $skycal_id, $PS_EXIT_SYS_ERROR); 175 } 176 # Expected output: HIERARCH FPA.FILTERID = 'r.00000 ' / Filter used (parsed, abstract name) 177 my ($undef, undef, undef, $filt) = split " ", join("", @$stdout_buf); 178 my $this_filter = substr $filt, 1, 7; 179 180 # if it matches we're done 181 last if $this_filter eq $filter; 182 183 # nope loop around to try the next one 184 print "Input file for $filter is not $file ($this_filter)\n"; 185 $file = undef; 166 186 } 167 # Expected output: HIERARCH FPA.FILTERID = 'r.00000 ' / Filter used (parsed, abstract name) 168 my ($undef, undef, undef, $filt) = split " ", join("", @$stdout_buf); 169 my $this_filter = substr $filt, 1, 7; 170 171 # if it matches we're done 172 last if $this_filter eq $filter; 173 174 # nope loop around to try the next one 175 print "Input file for $filter is not $file ($this_filter)\n"; 176 $file = undef; 177 } 187 } 188 # XXX: End of section that can be removed eventually 189 } 190 if ($file) { 178 191 print "\nInput file for $stack_id filter: $filter: $file\n"; 179 180 # XXX: End of section that can be removed eventually 181 } 182 } else { 183 # input is from a single filter static sky run use a different file rule 184 # XXX: can't we just make staticsky.pl use the same file rule? 185 $file = $ipprc->filename('PSPHOT.OUT.CMF.MEF', $path_base); 186 &my_die("Unable to find input for $stack_id $filter", $skycal_id, $PS_EXIT_SYS_ERROR) 187 unless $ipprc->file_exists($file); 188 } 189 190 if (!$file) { 191 &my_die("Unable to find input for $stack_id $filter", $skycal_id, $PS_EXIT_SYS_ERROR); 192 } else { 193 &my_die("Unable to find input file for stack_id $stack_id.", $skycal_id, $PS_EXIT_SYS_ERROR); 194 } 192 195 } 193 196 … … 197 200 } 198 201 199 # read the input header to find the number of detections and the number of detections 200 # with extended model 202 # XXX: The following is for compatability with psphotStack cmfs created prior to adding NDET 203 # read the input header to find the number of detections 204 my $compatability_flags = ""; 201 205 my $n_detections = 0; 202 my $n_extended = 0;203 206 { 207 # NSTARS is buggy. It only counts sources with a model, and counts them twice. 208 # We want the actual number of sources (real + matched). Use the length of the psf table 204 209 my $command = "echo $resolved | $fields -n SkyChip.psf NAXIS2"; 205 210 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 211 216 unless defined $n_detections; 212 217 213 $command = "echo $resolved | $fields -n SkyChip.hdr NDET_EXT"; 214 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 215 run(command => $command, verbose => 0); 216 (undef, $n_extended) = split " ", join "", @$stdout_buf; 217 chomp $n_extended; 218 &my_die("Unable to find number of extended objects from $file: ", $skycal_id, $PS_EXIT_SYS_ERROR) 219 unless defined $n_extended; 218 $compatability_flags .= " -n_detections $n_detections"; 219 220 220 } 221 221 … … 257 257 } 258 258 259 # if ppStats didn't get n_detections use the compatability version extracted above 260 $cmdflags .= $compatability_flags unless ($cmdflags =~ /-n_detections/); 261 259 262 my $quality; 260 263 ($quality) = $cmdflags =~ /-quality (\d+)/; … … 276 279 { 277 280 my $command = "$staticskytool -skycal_id $skycal_id"; 278 $command .= " -n_detections $n_detections";279 $command .= " -n_extended $n_extended";280 281 $command .= " -addskycalresult -path_base $outroot"; 281 282 $command .= " $cmdflags"; - Property svn:mergeinfo changed
-
tags/ipp-20121026/ippScripts/scripts/staticsky.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/ipp-20121026/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed
r34740 r34794 2119 2119 n_detections INT, 2120 2120 n_extended INT, 2121 n_forced INT, 2121 2122 zpt_obs FLOAT, 2122 2123 zpt_stdev FLOAT, -
tags/ipp-20121026/ippTools/share/staticskytool_pendingskycalrun.sql
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/eam_branches/ipp-20120405/ippTools/share/staticskytool_pendingskycalrun.sql merged eligible /branches/eam_branches/ipp-20120601/ippTools/share/staticskytool_pendingskycalrun.sql merged eligible /branches/eam_branches/ipp-20120627/ippTools/share/staticskytool_pendingskycalrun.sql merged eligible /branches/eam_branches/ipp-20120805/ippTools/share/staticskytool_pendingskycalrun.sql merged eligible /branches/eam_branches/ipp-20120905/ippTools/share/staticskytool_pendingskycalrun.sql merged eligible /trunk/ippTools/share/staticskytool_pendingskycalrun.sql merged eligible /branches/czw_branch/20101203/ippTools/share/staticskytool_pendingskycalrun.sql 29907-30631 /branches/eam_branches/ipp-20101103/ippTools/share/staticskytool_pendingskycalrun.sql 29657-29920 /branches/eam_branches/ipp-20101205/ippTools/share/staticskytool_pendingskycalrun.sql 29959-30585 /branches/eam_branches/ipp-20110213/ippTools/share/staticskytool_pendingskycalrun.sql 30628-31149 /branches/eam_branches/ipp-20110404/ippTools/share/staticskytool_pendingskycalrun.sql 31166-31444 /branches/eam_branches/ipp-20110505/ippTools/share/staticskytool_pendingskycalrun.sql 31458-31658 /branches/eam_branches/ipp-20110710/ippTools/share/staticskytool_pendingskycalrun.sql 31852-32345 /branches/eam_branches/ipp-20110906/ippTools/share/staticskytool_pendingskycalrun.sql 32363-32631 /branches/eam_branches/ipp-20111110/ippTools/share/staticskytool_pendingskycalrun.sql 32645-32694 /branches/haf_add201112/ippTools/share/staticskytool_pendingskycalrun.sql 32980-33029
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
tags/ipp-20121026/ippTools/src/staticskytool.c
- Property svn:mergeinfo set to
r34740 r34794 132 132 pxAddLabelSearchArgs(config, whereMD, "-select_data_group", "stackRun.data_group", "LIKE"); 133 133 pxAddLabelSearchArgs(config, whereMD, "-select_filter", "stackRun.filter", "LIKE"); 134 #ifdef notdef135 PXOPT_COPY_F32(config->args, whereMD, "-select_glat_min", "skycell.glat", ">=");136 PXOPT_COPY_F32(config->args, whereMD, "-select_glat_max", "skycell.glat", "<=");137 PXOPT_COPY_F32(config->args, whereMD, "-select_rahours_min", "skycell.radeg/15", ">=");138 PXOPT_COPY_F32(config->args, whereMD, "-select_rahours_max", "skycell.radeg/15", "<=");139 PXOPT_COPY_F32(config->args, whereMD, "-select_radeg_min", "skycell.radeg", ">=");140 PXOPT_COPY_F32(config->args, whereMD, "-select_radeg_max", "skycell.radeg", "<=");141 PXOPT_COPY_F32(config->args, whereMD, "-select_decdeg_min", "skycell.decdeg", ">=");142 PXOPT_COPY_F32(config->args, whereMD, "-select_decdeg_max", "skycell.decdeg", "<=");143 #endif144 134 if (!pxskycellAddWhere(config, whereMD)) { 145 135 psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments"); … … 686 676 psStringAppend(&query, "\nGROUP BY sky_id"); 687 677 if (num_filters) { 688 psStringAppend(&query, "\nHAVING COUNT(filter) >= %d", num_filters);678 psStringAppend(&query, "\nHAVING COUNT(filter) = %d", num_filters); 689 679 } 690 680 … … 1049 1039 pxAddLabelSearchArgs(config, whereMD, "-select_data_group", "staticskyRun.data_group", "LIKE"); 1050 1040 pxAddLabelSearchArgs(config, whereMD, "-select_filter", "stackRun.filter", "LIKE"); 1041 if (!pxskycellAddWhere(config, whereMD)) { 1042 psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments"); 1043 return false; 1044 } 1051 1045 1052 1046 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); … … 1128 1122 psString sky_label = psMetadataLookupStr(&status, row, "label"); 1129 1123 psString sky_data_group = psMetadataLookupStr(&status, row, "data_group"); 1124 psString sky_dist_group = psMetadataLookupStr(&status, row, "dist_group"); 1130 1125 1131 1126 // create a staticskyRun … … 1138 1133 label ? label : sky_label, 1139 1134 data_group ? data_group : sky_data_group, 1140 dist_group ,1135 dist_group ? dist_group : sky_dist_group, 1141 1136 reduction, 1142 1137 registered, … … 1159 1154 1160 1155 psMetadata *where = psMetadataAlloc(); 1161 PXOPT_COPY_S64(config->args, where, "-skycal_id", "skycal_id", "=="); 1156 PXOPT_COPY_S64(config->args, where, "-skycal_id", "skycal_id", "=="); 1157 PXOPT_COPY_S64(config->args, where, "-sky_id", "sky_id", "=="); 1158 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 1162 1159 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 1163 1160 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); … … 1276 1273 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 1277 1274 PXOPT_LOOKUP_S32(n_astrom, config->args, "-n_astrom", false, false); 1278 PXOPT_LOOKUP_S32(n_detections, config->args, "-n_detections", false, false); 1279 PXOPT_LOOKUP_S32(n_extended, config->args, "-n_extended", false, false); 1275 PXOPT_LOOKUP_S32(n_detections, config->args,"-n_detections", false, false); 1276 PXOPT_LOOKUP_S32(n_extended, config->args, "-n_extended", false, false); 1277 PXOPT_LOOKUP_S32(n_forced, config->args, "-n_forced", false, false); 1280 1278 1281 1279 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); … … 1318 1316 n_detections, 1319 1317 n_extended, 1318 n_forced, 1320 1319 zpt_obs, 1321 1320 zpt_stdev, -
tags/ipp-20121026/ippTools/src/staticskytoolConfig.c
- Property svn:mergeinfo set to
r34740 r34794 126 126 psMetadataAddStr(resultArgs, PS_LIST_TAIL, "-label", 0, "search by label", NULL); 127 127 psMetadataAddStr(resultArgs, PS_LIST_TAIL, "-data_group", 0, "search by data_group (LIKE comparison)", NULL); 128 psMetadataAddS16(resultArgs, PS_LIST_TAIL, "-num_filters", 0, "search by number of filters in the inputs (>=)", 0);128 psMetadataAddS16(resultArgs, PS_LIST_TAIL, "-num_filters", 0, "search by number of filters in the inputs", 0); 129 129 pxskycellAddArguments(resultArgs); 130 130 psMetadataAddS16(resultArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); … … 166 166 psMetadataAddStr(defineskycalrunArgs, PS_LIST_TAIL, "-select_data_group", PS_META_DUPLICATE_OK, "search by stackRun data_group (LIKE comparison, multiple OK)", NULL); 167 167 psMetadataAddStr(defineskycalrunArgs, PS_LIST_TAIL, "-select_filter", PS_META_DUPLICATE_OK, "search by filter (LIKE comparison, multiple OK)", NULL); 168 pxskycellAddArguments(defineskycalrunArgs); 168 169 psMetadataAddStr(defineskycalrunArgs, PS_LIST_TAIL, "-set_workdir", 0, "define workdir", NULL); 169 170 psMetadataAddStr(defineskycalrunArgs, PS_LIST_TAIL, "-set_label", 0, "define label", NULL); … … 181 182 psMetadata *updateskycalrunArgs = psMetadataAlloc(); 182 183 psMetadataAddS64(updateskycalrunArgs, PS_LIST_TAIL, "-skycal_id", 0, "search by skycal ID", 0); 184 psMetadataAddS64(updateskycalrunArgs, PS_LIST_TAIL, "-sky_id", 0, "search by sky ID", 0); 185 psMetadataAddS64(updateskycalrunArgs, PS_LIST_TAIL, "-stack_id", 0, "search by stack ID", 0); 183 186 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 184 187 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-label", 0, "search by label", 0); 188 pxskycellAddArguments(updateskycalrunArgs); 185 189 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-set_label", 0, "define new value for label", NULL); 186 190 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-set_state", 0, "define new state", NULL); … … 215 219 psMetadataAddS32(addskycalresultArgs, PS_LIST_TAIL, "-n_detections", 0, "define number of detections", 0); 216 220 psMetadataAddS32(addskycalresultArgs, PS_LIST_TAIL, "-n_extended", 0, "define number of extended detections", 0); 221 psMetadataAddS32(addskycalresultArgs, PS_LIST_TAIL, "-n_forced", 0, "define number of forced detections", 0); 217 222 218 223 psMetadataAddStr(addskycalresultArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); -
tags/ipp-20121026/ippconfig/recipes/ppStats.config
- Property svn:mergeinfo set to
r30049 r34794 127 127 HEADER STR IMAGE_V 128 128 HEADER STR STREAK_V 129 130 HEADER STR NDET # sources->n 131 HEADER STR NDET_EXT 132 HEADER STR NDET_FRC 129 133 130 134 ANALYSIS MULTI # metadata blocks to search in chip/cell/readout->analysis -
tags/ipp-20121026/ippconfig/recipes/ppStatsFromMetadata.config
- Property svn:mergeinfo set to
r32966 r34794 544 544 ENTRY VAL DT_ASTR F32 CONSTANT -dtime_astrom 545 545 ENTRY VAL NASTRO S32 CONSTANT -n_astrom 546 ENTRY VAL NDET S32 CONSTANT -n_detections 547 ENTRY VAL NDET_EXT S32 CONSTANT -n_extended 548 ENTRY VAL NDET_FRC S32 CONSTANT -n_forced 546 549 547 550 ENTRY VAL ZPT_OBS F32 CONSTANT -zpt_obs
Note:
See TracChangeset
for help on using the changeset viewer.
