Changeset 30049
- Timestamp:
- Dec 15, 2010, 1:29:28 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 41 edited
- 5 copied
-
. (modified) (1 prop)
-
dbconfig/changes.txt (modified) (1 diff)
-
dbconfig/raw.md (modified) (1 diff)
-
ippScripts/Build.PL (modified) (1 diff)
-
ippScripts/MANIFEST (modified) (1 diff)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (copied) (copied from branches/czw_branch/20101203/ippScripts/scripts/ipp_apply_burntool_single.pl )
-
ippScripts/scripts/nightly_science.pl (copied) (copied from branches/czw_branch/20101203/ippScripts/scripts/nightly_science.pl )
-
ippScripts/scripts/register_exp.pl (modified) (4 diffs)
-
ippScripts/scripts/register_imfile.pl (modified) (7 diffs)
-
ippTasks/Makefile.am (modified) (2 diffs)
-
ippTasks/nightly_science.pro (copied) (copied from branches/czw_branch/20101203/ippTasks/nightly_science.pro )
-
ippTasks/nightly_stacks.pro (modified) (15 diffs)
-
ippTasks/register.pro (modified) (6 diffs)
-
ippTools/share/Makefile.am (modified) (2 diffs)
-
ippTools/share/camtool_find_pendingimfile.sql (modified) (1 prop)
-
ippTools/share/chiptool_find_rawexp.sql (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (2 diffs, 1 prop)
-
ippTools/share/regtool_checkburntoolimfile.sql (copied) (copied from branches/czw_branch/20101203/ippTools/share/regtool_checkburntoolimfile.sql )
-
ippTools/share/regtool_pendingburntoolimfile.sql (copied) (copied from branches/czw_branch/20101203/ippTools/share/regtool_pendingburntoolimfile.sql )
-
ippTools/share/regtool_pendingexp.sql (modified) (1 diff)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/chiptool.c (modified) (2 diffs)
-
ippTools/src/chiptoolConfig.c (modified) (1 diff)
-
ippTools/src/pztool.c (modified) (1 diff)
-
ippTools/src/regtool.c (modified) (8 diffs)
-
ippTools/src/regtool.h (modified) (1 diff)
-
ippTools/src/regtoolConfig.c (modified) (5 diffs)
-
ippconfig (modified) (1 prop)
-
ippconfig/gpc1/format_20080925.config (modified) (1 diff)
-
ippconfig/gpc1/format_20080929.config (modified) (1 diff)
-
ippconfig/gpc1/format_20081011.config (modified) (1 diff)
-
ippconfig/gpc1/format_20090120.config (modified) (1 diff)
-
ippconfig/gpc1/format_20090220.config (modified) (1 diff)
-
ippconfig/gpc1/format_20100122.config (modified) (1 diff)
-
ippconfig/gpc1/format_orig.config (modified) (1 diff)
-
ippconfig/recipes/nightly_science.config (modified) (10 diffs)
-
ippconfig/recipes/ppStats.config (modified) (1 diff)
-
ippconfig/recipes/ppStatsFromMetadata.config (modified) (1 diff)
-
psLib/src/imageops (modified) (1 prop)
-
psModules/src/concepts/pmConcepts.c (modified) (2 diffs)
-
psModules/src/concepts/pmConceptsStandard.c (modified) (1 diff)
-
psModules/src/concepts/pmConceptsStandard.h (modified) (1 diff)
-
psModules/src/objects (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src/psphotApResid.c (modified) (1 prop)
-
psphot/src/psphotMakeFluxScale.c (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/czw_branch/20101203 (added) merged: 29907-29909,29965,29982,30014,30017-30018,30047-30048
- Property svn:mergeinfo changed
-
trunk/dbconfig/changes.txt
r29971 r30049 1994 1994 1995 1995 -- Version 1.1.67 1996 1997 ALTER TABLE rawImfile ADD column video_cells TINYINT AFTER burntool_state; -
trunk/dbconfig/raw.md
r27149 r30049 141 141 md5sum STR 32 142 142 burntool_state S16 0 143 video_cells BOOL f 143 144 END -
trunk/ippScripts/Build.PL
r29530 r30049 105 105 scripts/whichimage 106 106 scripts/automate_stacks.pl 107 scripts/nightly_science.pl 107 108 scripts/lossy_compress_imfile.pl 108 109 scripts/ipp_apply_burntool.pl 110 scripts/ipp_apply_burntool_single.pl 109 111 scripts/make_burntool_pcontrol.pl 110 112 scripts/bundle_detrends.pl -
trunk/ippScripts/MANIFEST
r28375 r30049 37 37 scripts/ds9_cmf_regions.pl 38 38 scripts/automate_stacks.pl 39 scripts/nightly_science.pl 39 40 scripts/lossy_compress_imfile.pl 40 41 scripts/ipp_apply_burntool.pl 42 scripts/ipp_apply_burntool_single.pl 41 43 scripts/make_burntool_pcontrol.pl 42 44 scripts/bundle_detrends.pl -
trunk/ippScripts/scripts/register_exp.pl
r27891 r30049 30 30 my $regtool = can_run('regtool') or (warn "can't find regtool" and $missing_tools = 1); 31 31 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 32 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 32 33 if ($missing_tools) { 33 34 warn ("Can't find required tools"); … … 118 119 if (uc($exp_type) eq "NULL") { &my_die ("exp_type not found", $exp_id, $PS_EXIT_CONFIG_ERROR); } 119 120 121 my ($data_group,$dist_group,$chip_workdir,$reduction); 122 ($label,$data_group,$dist_group,$end_stage, 123 $tess_id,$chip_workdir,$reduction) = advance_decisions(&value_for_flag($cmdflags,"-dateobs"), 124 &value_for_flag($cmdflags,"-exp_type"), 125 &value_for_flag($cmdflags,"-obs_mode"), 126 &value_for_flag($cmdflags,"-object"), 127 &value_for_flag($cmdflags,"-comment"), 128 $dbname); 120 129 my $command = "$regtool -addprocessedexp"; 121 130 $command .= " -exp_id $exp_id"; … … 127 136 $command .= " -end_stage $end_stage" if defined $end_stage; 128 137 $command .= " -tess_id $tess_id" if defined $tess_id; 138 $command .= " -data_group $data_group" if defined $data_group; 139 $command .= " -dist_group $dist_group" if defined $dist_group; 140 $command .= " -chip_workdir $chip_workdir" if defined $chip_workdir; 141 $command .= " -reduction $reduction" if defined $reduction; 129 142 $command .= " -state full"; 130 143 $command .= " $cmdflags"; … … 156 169 157 170 ### Pau. 171 sub advance_decisions { 172 my $dateobs = shift; 173 my $exptype = shift; 174 my $obsmode = shift; 175 my $object = shift; 176 my $comment = shift; 177 my $dbname = shift; 178 179 # The strings come pre-quoted. 180 $dateobs =~ s/\'//g; 181 $exptype =~ s/\'//g; 182 $obsmode =~ s/\'//g; 183 $object =~ s/\'//g; 184 $comment =~ s/\'//g; 185 186 print "Inside decision engine\n"; 187 my ($label,$data_group,$dist_group,$end_stage,$tess_id,$chip_workdir,$reduction); 188 my $target; 189 190 if ($exptype ne 'OBJECT') { 191 print "Aborting because exptype doesn't claim to be OBJECT: $exptype\n"; 192 return(undef,undef,undef,"reg",undef,undef,undef); 193 } 194 if ($obsmode eq 'ENGINEERING') { 195 print "Aborting because we don't queue engineering data to chip\n"; 196 return(undef,undef,undef,"reg",undef,undef,undef); 197 } 198 # Grab the configuration data. 199 my %nightlyscience_config = (); 200 my $conf_cmd = "$ppConfigDump -dump-recipe NIGHTLY_SCIENCE -"; 201 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 202 run(command => $conf_cmd, verbose => $verbose); 203 unless ($success) { 204 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 205 &my_die("Unable to perform ppConfigDump: $error_code", $date, $PS_EXIT_SYS_ERROR); 206 } 207 print "data loaded\n"; 208 my $mdcParser = PS::IPP::Metadata::Config->new; 209 my $metadata = $mdcParser->parse(join "", @$stdout_buf); 210 foreach my $entry (@{ $metadata }) { 211 if (${ $entry }{name} eq 'TARGETS') { 212 my @target_data = @{ ${ $entry }{value} }; 213 my $this_target = ''; 214 foreach my $tentry (@target_data) { 215 if (${ $tentry }{name} eq 'NAME') { 216 $this_target = ${ $tentry }{value}; 217 $nightlyscience_config{$this_target}{DISTRIBUTION} = $this_target; 218 } 219 elsif (${ $tentry }{name} eq 'DISTRIBUTION') { 220 $nightlyscience_config{$this_target}{DISTRIBUTION} = ${ $tentry }{value}; 221 } 222 elsif (${ $tentry }{name} eq 'TESS') { 223 $nightlyscience_config{$this_target}{TESS_ID} = ${ $tentry }{value}; 224 } 225 elsif (${ $tentry }{name} eq 'OBSMODE') { 226 $nightlyscience_config{$this_target}{OBSMODE} = ${ $tentry }{value}; 227 $nightlyscience_config{$this_target}{OBSMODE} =~ s/%/\.\*/g; 228 } 229 elsif (${ $tentry }{name} eq 'OBJECT') { 230 $nightlyscience_config{$this_target}{OBJECT} = ${ $tentry }{value}; 231 $nightlyscience_config{$this_target}{OBJECT} =~ s/%/\.\*/g; 232 } 233 elsif (${ $tentry }{name} eq 'COMMENT') { 234 $nightlyscience_config{$this_target}{COMMENT} = ${ $tentry }{value}; 235 $nightlyscience_config{$this_target}{COMMENT} =~ s/%/\.\*/g; 236 } 237 elsif (${ $tentry }{name} eq 'STACKABLE') { 238 $nightlyscience_config{$this_target}{STACKABLE} = ${ $tentry }{value}; 239 } 240 elsif (${ $tentry }{name} eq 'DIFFABLE') { 241 $nightlyscience_config{$this_target}{DIFFABLE} = ${ $tentry }{value}; 242 } 243 elsif (${ $tentry }{name} eq 'REDUCTION') { 244 $nightlyscience_config{$this_target}{REDUCTION} = ${ $tentry }{value}; 245 } 246 } 247 } 248 } 249 print "data parsed\n"; 250 my $found_target; 251 foreach $target (keys %nightlyscience_config) { 252 # print "TEST: $target ($obsmode $object $comment) ($nightlyscience_config{$target}{OBSMODE} $nightlyscience_config{$target}{OBJECT} $nightlyscience_config{$target}{COMMENT}\t"; 253 my $match = 0; 254 my $possible = 0; 255 if (exists($nightlyscience_config{$target}{OBSMODE})) { 256 $possible++; 257 if ($obsmode =~ /$nightlyscience_config{$target}{OBSMODE}/) { 258 $match++; 259 } 260 } 261 if (exists($nightlyscience_config{$target}{OBJECT})) { 262 $possible++; 263 if ($object =~ /$nightlyscience_config{$target}{OBJECT}/) { 264 $match++; 265 } 266 } 267 if (exists($nightlyscience_config{$target}{COMMENT})) { 268 $possible++; 269 if ($comment =~ /$nightlyscience_config{$target}{COMMENT}/) { 270 $match++; 271 } 272 } 273 print "$possible $match\n"; 274 if (($possible > 0)&&($match == $possible)) { 275 $found_target = $target; 276 last; 277 } 278 } 279 unless ($found_target) { 280 print "No acceptible target found.\n"; 281 return(undef,undef,undef,"reg",undef,undef,undef); 282 } 283 print "Found this target: $found_target\n"; 284 print "$dateobs\n"; 285 $target = $found_target; 286 287 my $date = $dateobs; 288 $date =~ s/T.*//; 289 my $workdir_date = $date; 290 $date =~ s/-//g; 291 $workdir_date =~ s%-%/%g; 292 print "$dateobs $date $workdir_date\n"; 293 $label = "${target}.nightlyscience"; 294 $data_group = "${target}.${date}"; 295 $dist_group = $nightlyscience_config{$target}{DISTRIBUTION}; 296 $end_stage = 'warp'; 297 $tess_id = $nightlyscience_config{$target}{TESS_ID}; 298 $chip_workdir = "neb://\@HOST\@.0/${dbname}/${target}.nt/${workdir_date}/"; 299 if (exists($nightlyscience_config{$target}{REDUCTION})) { 300 $reduction = $nightlyscience_config{$target}{REDUCTION}; 301 } 302 else { 303 undef($reduction); 304 } 305 306 307 return ($label,$data_group,$dist_group,$end_stage,$tess_id,$chip_workdir,$reduction); 308 } 309 310 311 158 312 159 313 sub cache_run -
trunk/ippScripts/scripts/register_imfile.pl
r27891 r30049 19 19 use File::Basename qw( basename); 20 20 use IPC::Run; 21 use IPC::Cmd 0.36 qw( can_run );21 use IPC::Cmd 0.36 qw( can_run run ); 22 22 use PS::IPP::Config 1.01 qw( :standard ); 23 use PS::IPP::Metadata::List qw( parse_md_list ); 23 24 use PS::IPP::Metadata::Config; 24 25 use Math::Trig; … … 35 36 my $ppStatsFromMetadata = can_run( 'ppStatsFromMetadata' ) or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 36 37 my $ppConfigDump = can_run( 'ppConfigDump' ) or (warn "Can't find ppConfigDump" and $missing_tools = 1); 38 my $ippApplyBurntoolSingle = can_run( 'ipp_apply_burntool_single.pl' ) or (warn "Can't find ipp_apply_burntool_single" and $missing_tools = 1); 37 39 38 40 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $bytes, $md5sum, $dbname, $verbose, $no_update, $no_op, $logfile); … … 82 84 83 85 my $cmdflags; 86 my $burntoolStateGood; 84 87 # Run ppStats on the input file 85 88 { … … 114 117 my $burntoolState = 0; 115 118 my $isGPC1 = 0; 116 my$burntoolStateGood = 0;119 $burntoolStateGood = 0; 117 120 foreach my $line (split /\n/, $out1) { 118 121 if ($line =~ /FPA.BURNTOOL.APPLIED/) { … … 174 177 $command .= " -hostname $host" if defined $host; 175 178 $command .= " -dbname $dbname" if defined $dbname; 176 $command .= " -data_state full";179 $command .= " -data_state check_burntool"; 177 180 $command .= " $cmdflags"; 178 181 182 print "$command\n"; 179 183 # determine solar-system parameters 180 184 my $longitude = &value_for_flag($cmdflags, 0.0, "-longitude"); … … 206 210 } 207 211 } 212 213 # This might have a race condition 214 # $date_end = $dateobs; 215 # $date_start = $dateobs - 30 minutes ? dateobs_UTC_midnight? 216 # lock file? 217 # if exp_type = DARK and date > MIDNIGHT HST { wait } 218 # system("ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $date_start --dateobs_end $date_end --dbname gpc1 --logfile /data/$host.0/burntool_logs/$class_id.$start_date.log"); 208 219 209 220 $now_time = localtime(); … … 222 233 print "skipping command: $command\n"; 223 234 } 235 236 # We now have an imfile in the database, check if we can burntool it. If not, continue on. 237 238 { 239 my $mdcParser = PS::IPP::Metadata::Config->new; 240 241 my $class_id = &value_for_flag($cmdflags, 0.0, "-class_id"); 242 my $check_date = &value_for_flag($cmdflags, 0.0, "-dateobs"); 243 $check_date =~ s/T.*$//; 244 my $exp_name = $tmp_exp_name; 245 246 247 my $bt_check_command = "$regtool -checkburntoolimfile "; 248 $bt_check_command .= " -class_id $class_id "; 249 $bt_check_command .= " -date $check_date "; 250 $bt_check_command .= " -valid_burntool $burntoolStateGood "; 251 $bt_check_command .= " -exp_name $exp_name "; 252 $bt_check_command .= " -dbname $dbname" if defined $dbname; 253 254 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 255 run ( command => $bt_check_command, verbose => $verbose); 256 unless ($success) { 257 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 258 &my_die("Unable to perform regtool: $error_code", 259 $class_id, $exp_name, $date, $PS_EXIT_SYS_ERROR); 260 } 261 262 my @whole = split /\n/, (join "", @$stdout_buf); 263 my @single = (); 264 my $exposures; 265 while ( scalar @whole > 0 ) { 266 my $value = shift @whole; 267 push @single, $value; 268 if ($value =~ /^\s*END\s*$/) { 269 push @single, "\n"; 270 271 my $list = parse_md_list( $mdcParser->parse( join( "\n", @single ) ) ); 272 &my_die("Unable to parse output from regtool", 273 $class_id, $exp_name, $date, $PS_EXIT_SYS_ERROR) unless 274 defined $list; 275 push @{ $exposures }, @$list; 276 @single = (); 277 } 278 } 279 280 # We only care about the final entry, as that contains the exposure we are. 281 282 my $regtool_update = "$regtool -updateprocessedimfile "; 283 $regtool_update .= "-dbname $dbname " if defined $dbname; 284 $regtool_update .= "-exp_id $exp_id -class_id $class_id "; 285 286 my $burntool_data = pop(@{ $exposures }); 287 if ($burntool_data->{burnable} == 0) { 288 $regtool_update .= " -burntool_state 0 -set_state pending_burntool "; 289 } 290 else { 291 my $apply_command = "$ippApplyBurntoolSingle --dbname $dbname "; 292 $apply_command .= " --class_id $class_id --exp_id $exp_id "; 293 $apply_command .= " --this_uri $burntool_data->{uri} "; 294 $apply_command .= " --previous_uri $burntool_data->{previous_uri} " if defined $burntool_data->{previous_uri}; 295 $apply_command .= " --imfile_state $burntool_data->{imfile_state} "; 296 $apply_command .= " --verbose " if $verbose; 297 print "$apply_command\n"; 298 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 299 IPC::Cmd::run(command => $apply_command, verbose => $verbose); 300 unless ($success) { 301 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 302 warn ("Unable to perform ipp_apply_burntool_single.pl: $error_code"); 303 exit($error_code); 304 } 305 } 306 307 unless ($no_update) { 308 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 309 IPC::Cmd::run(command => $regtool_update, verbose => $verbose); 310 unless ($success) { 311 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 312 warn ("Unable to perform regtool -addprocessedimfile: $error_code"); 313 exit($error_code); 314 } 315 } else { 316 print "skipping command: $command\n"; 317 } 318 319 } 320 321 224 322 225 323 $now_time = localtime(); -
trunk/ippTasks/Makefile.am
r29614 r30049 36 36 minidvodb.pro \ 37 37 minidvodbcopy.pro \ 38 nightly_s tacks.pro \38 nightly_science.pro \ 39 39 burntool.pro \ 40 40 lossy_compress.pro \ … … 47 47 site.manoa.pro \ 48 48 site.mhpcc.pro \ 49 site.mhpcc_testing.pro \ 49 50 surveys.mhpcc.config \ 50 51 simtest.pro \ -
trunk/ippTasks/nightly_stacks.pro
r29656 r30049 7 7 ns.detrends.off 8 8 ns.dqstats.on 9 ns.sweetspot.on10 ns.registration.on11 ns.burntool.on12 ns.chips.on9 # ns.sweetspot.on 10 # ns.registration.on 11 # ns.burntool.on 12 # ns.chips.on 13 13 ns.stacks.on 14 ns.diffs.on 14 15 end 15 16 … … 18 19 ns.detrends.off 19 20 ns.dqstats.off 20 ns.sweetspot.off21 ns.registration.off22 ns.burntool.off23 ns.chips.off21 # ns.sweetspot.off 22 # ns.registration.off 23 # ns.burntool.off 24 # ns.chips.off 24 25 ns.stacks.off 26 ns.diffs.off 25 27 end 26 28 … … 51 53 end 52 54 53 macro ns.sweetspot.on54 task ns.sweetspot.load55 active true56 end57 end58 59 macro ns.registration.on60 task ns.registration.load61 active true62 end63 end64 65 macro ns.burntool.on66 task ns.burntool.load67 active true68 end69 task ns.burntool.run70 active true71 end72 end73 74 macro ns.chips.on75 task ns.chips.load76 active true77 end78 task ns.chips.run79 active true80 end81 end55 # macro ns.sweetspot.on 56 # task ns.sweetspot.load 57 # active true 58 # end 59 # end 60 61 # macro ns.registration.on 62 # task ns.registration.load 63 # active true 64 # end 65 # end 66 67 # macro ns.burntool.on 68 # task ns.burntool.load 69 # active true 70 # end 71 # task ns.burntool.run 72 # active true 73 # end 74 # end 75 76 # macro ns.chips.on 77 # task ns.chips.load 78 # active true 79 # end 80 # task ns.chips.run 81 # active true 82 # end 83 # end 82 84 83 85 macro ns.stacks.on … … 93 95 end 94 96 97 macro ns.diffs.on 98 task ns.diffs.load 99 active false 100 end 101 task ns.diffs.run 102 active true 103 end 104 end 105 95 106 macro ns.initday.off 96 107 task ns.initday.load … … 111 122 end 112 123 113 macro ns.sweetspot.off114 task ns.sweetspot.load115 active false116 end117 end118 119 macro ns.registration.off120 task ns.registration.load121 active false122 end123 end124 125 macro ns.burntool.off126 task ns.burntool.load127 active false128 end129 task ns.burntool.run130 active false131 end132 end133 134 macro ns.chips.off135 task ns.chips.load136 active false137 end138 task ns.chips.run139 active false140 end141 end124 # macro ns.sweetspot.off 125 # task ns.sweetspot.load 126 # active false 127 # end 128 # end 129 130 # macro ns.registration.off 131 # task ns.registration.load 132 # active false 133 # end 134 # end 135 136 # macro ns.burntool.off 137 # task ns.burntool.load 138 # active false 139 # end 140 # task ns.burntool.run 141 # active false 142 # end 143 # end 144 145 # macro ns.chips.off 146 # task ns.chips.load 147 # active false 148 # end 149 # task ns.chips.run 150 # active false 151 # end 152 # end 142 153 143 154 macro ns.stacks.off … … 150 161 end 151 162 152 $ns_regPAGE = 0 153 $ns_burnPAGE = 0 154 $ns_RburnPAGE = 0 155 $ns_RburnCELL = 0 156 $ns_chipPAGE = 0 157 $ns_RchipPAGE = 0 163 macro ns.diffs.off 164 task ns.diffs.load 165 active false 166 end 167 task ns.diffs.run 168 active false 169 end 170 end 171 172 # $ns_regPAGE = 0 173 # $ns_burnPAGE = 0 174 # $ns_RburnPAGE = 0 175 # $ns_RburnCELL = 0 176 # $ns_chipPAGE = 0 177 # $ns_RchipPAGE = 0 158 178 $ns_stackPAGE = 0 159 179 $ns_RstackPAGE = 0 160 180 $ns_CstackPAGE = 0 181 $ns_diffPAGE = 0 182 $ns_RdiffPAGE = 0 161 183 162 184 book init nsData 163 book init nsBurntool185 # book init nsBurntool 164 186 # 165 187 # Macros to control the book. … … 177 199 echo $date $state 178 200 end 179 book npages nsBurntool -var Npages201 # book npages nsBurntool -var Npages 180 202 end 181 203 … … 198 220 periods -exec $LOADEXEC 199 221 periods -timeout 30 200 trange 16:30:00 17:30:00 -nmax 1222 trange 0:00:00 1:00:00 -nmax 1 201 223 npending 1 202 224 … … 204 226 stdout $LOGDIR/ns.initday.log 205 227 stderr $LOGDIR/ns.initday.log 206 $today = `date +%Y-%m-%d`228 $today = `date -u +%Y-%m-%d` 207 229 book newpage nsData $today 208 230 book setword nsData $today nsState NEW … … 242 264 stdout $LOGDIR/ns.detrends.log 243 265 stdout $LOGDIR/ns.detrends.log 244 $today = `date +%Y-%m-%d`266 $today = `date -u +%Y-%m-%d` 245 267 246 268 command automate_stacks.pl --queue_detrends --date $today … … 278 300 stdout $LOGDIR/ns.dqstats.log 279 301 stderr $LOGDIR/ns.dqstats.log 280 $today = `date +%Y-%m-%d`302 $today = `date -u +%Y-%m-%d` 281 303 282 304 command automate_stacks.pl --queue_dqstats --date $today … … 313 335 stdout $LOGDIR/ns.sweetspot.log 314 336 stderr $LOGDIR/ns.sweetspot.log 315 $today = `date +%Y-%m-%d`337 $today = `date -u +%Y-%m-%d` 316 338 317 339 command automate_stacks.pl --queue_sweetspot --date $today … … 337 359 # Check to see if registration is complete 338 360 # 339 task ns.registration.load340 host local341 periods -poll $LOADPOLL342 periods -exec $LOADEXEC343 periods -timeout 30344 npending 1345 346 task.exec347 stdout NULL348 stderr $LOGDIR/ns.registration.log349 350 book getpage nsData $ns_regPAGE -var date351 book getword nsData $date nsState -var ns_STATE352 book npages nsData -var Npages353 354 if ($VERBOSE > 5)355 echo "ns.registration.load: " $ns_regPAGE $date $ns_STATE $Npages356 end357 358 $ns_regPAGE ++359 if ($ns_regPAGE >= $Npages) set ns_regPAGE = 0360 option $date361 362 if ("$ns_STATE" != "NEW") break363 $run = automate_stacks.pl --check_registration --date $date364 command $run365 end366 367 # success368 task.exit 0369 # convert 'stdout' to book format370 book delpage nsData $options:0371 ipptool2book stdout nsData -uniq -key date372 373 if ($VERBOSE > 2)374 book listbook nsData375 end376 end377 378 # locked list379 task.exit default380 showcommand failure381 end382 task.exit crash383 showcommand crash384 end385 #operation times out?386 task.exit timeout387 showcommand timeout388 end389 end390 391 # 392 # Check to see if the chips have been properly burntooled and are ready for queueing393 # 394 task ns.chips.load395 host local396 periods -poll $LOADPOLL397 periods -exec $LOADEXEC398 periods -timeout 300399 npending 1400 401 task.exec402 stdout NULL403 stderr $LOGDIR/ns.chips.log404 405 book getpage nsData $ns_chipPAGE -var date406 book getword nsData $date nsState -var ns_STATE407 book npages nsData -var Npages408 409 if ($VERBOSE > 5)410 echo "ns.chips.load: " $ns_chipPAGE $date $ns_STATE $Npages411 end412 413 $ns_chipPAGE ++414 if ($ns_chipPAGE >= $Npages) set ns_chipPAGE = 0415 option $date416 417 if (("$ns_STATE" != "REGISTERED")&&("$ns_STATE" != "BURNING")) break418 $run = automate_stacks.pl --check_chips --date $date419 420 if ("$ns_STATE" == "BURNING")421 $run = $run --isburning422 end423 command $run424 end425 # success426 task.exit 0427 # convert 'stdout' to book format428 book delpage nsData $options:0429 ipptool2book stdout nsData -uniq -key date430 431 # remove the burntool page if we're done with it.432 book getword nsData $options:0 nsState -var ns_STATE433 if ("$ns_STATE" == "QUEUECHIPS")434 book delpage nsBurntool $options:0435 end436 437 book getword nsData $options:0 nsNmacros -var ns_Nmacros438 if ("$ns_Nmacros" != "NULL")439 for i 0 $ns_Nmacros440 sprintf macroName "ns%dMacro" $i441 book getword nsData $options:0 $macroName -var macroCmd442 $macroCmd443 end444 end445 446 if ($VERBOSE > 2)447 book listbook nsData448 end449 end450 451 # locked list452 task.exit default453 showcommand failure454 end455 task.exit crash456 showcommand crash457 end458 #operation times out?459 task.exit timeout460 showcommand timeout461 end462 end463 464 # 465 # Check to see if the chips have been properly burntooled and are ready for queueing466 # 467 task ns.chips.run468 host local469 periods -poll $LOADPOLL470 periods -exec $LOADEXEC471 periods -timeout 120472 npending 1473 474 task.exec475 stdout NULL476 stderr $LOGDIR/ns.chips.log477 478 book getpage nsData $ns_RchipPAGE -var date479 book getword nsData $date nsState -var ns_STATE480 book npages nsData -var Npages481 482 if ($VERBOSE > 5)483 echo "ns.chips.run: " $ns_RchipPAGE $date $ns_STATE $Npages484 end361 # task ns.registration.load 362 # host local 363 # periods -poll $LOADPOLL 364 # periods -exec $LOADEXEC 365 # periods -timeout 30 366 # npending 1 367 368 # task.exec 369 # stdout NULL 370 # stderr $LOGDIR/ns.registration.log 371 372 # book getpage nsData $ns_regPAGE -var date 373 # book getword nsData $date nsState -var ns_STATE 374 # book npages nsData -var Npages 375 376 # if ($VERBOSE > 5) 377 # echo "ns.registration.load: " $ns_regPAGE $date $ns_STATE $Npages 378 # end 379 380 # $ns_regPAGE ++ 381 # if ($ns_regPAGE >= $Npages) set ns_regPAGE = 0 382 # option $date 383 384 # if ("$ns_STATE" != "NEW") break 385 # $run = automate_stacks.pl --check_registration --date $date 386 # command $run 387 # end 388 389 # # success 390 # task.exit 0 391 # # convert 'stdout' to book format 392 # book delpage nsData $options:0 393 # ipptool2book stdout nsData -uniq -key date 394 395 # if ($VERBOSE > 2) 396 # book listbook nsData 397 # end 398 # end 399 400 # # locked list 401 # task.exit default 402 # showcommand failure 403 # end 404 # task.exit crash 405 # showcommand crash 406 # end 407 # #operation times out? 408 # task.exit timeout 409 # showcommand timeout 410 # end 411 # end 412 413 # # 414 # # Check to see if the chips have been properly burntooled and are ready for queueing 415 # # 416 # task ns.chips.load 417 # host local 418 # periods -poll $LOADPOLL 419 # periods -exec $LOADEXEC 420 # periods -timeout 300 421 # npending 1 422 423 # task.exec 424 # stdout NULL 425 # stderr $LOGDIR/ns.chips.log 426 427 # book getpage nsData $ns_chipPAGE -var date 428 # book getword nsData $date nsState -var ns_STATE 429 # book npages nsData -var Npages 430 431 # if ($VERBOSE > 5) 432 # echo "ns.chips.load: " $ns_chipPAGE $date $ns_STATE $Npages 433 # end 434 435 # $ns_chipPAGE ++ 436 # if ($ns_chipPAGE >= $Npages) set ns_chipPAGE = 0 437 # option $date 438 439 # if (("$ns_STATE" != "REGISTERED")&&("$ns_STATE" != "BURNING")) break 440 # $run = automate_stacks.pl --check_chips --date $date 441 442 # if ("$ns_STATE" == "BURNING") 443 # $run = $run --isburning 444 # end 445 # command $run 446 # end 447 # # success 448 # task.exit 0 449 # # convert 'stdout' to book format 450 # book delpage nsData $options:0 451 # ipptool2book stdout nsData -uniq -key date 452 453 # # remove the burntool page if we're done with it. 454 # book getword nsData $options:0 nsState -var ns_STATE 455 # if ("$ns_STATE" == "QUEUECHIPS") 456 # book delpage nsBurntool $options:0 457 # end 458 459 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 460 # if ("$ns_Nmacros" != "NULL") 461 # for i 0 $ns_Nmacros 462 # sprintf macroName "ns%dMacro" $i 463 # book getword nsData $options:0 $macroName -var macroCmd 464 # $macroCmd 465 # end 466 # end 467 468 # if ($VERBOSE > 2) 469 # book listbook nsData 470 # end 471 # end 472 473 # # locked list 474 # task.exit default 475 # showcommand failure 476 # end 477 # task.exit crash 478 # showcommand crash 479 # end 480 # #operation times out? 481 # task.exit timeout 482 # showcommand timeout 483 # end 484 # end 485 486 # # 487 # # Check to see if the chips have been properly burntooled and are ready for queueing 488 # # 489 # task ns.chips.run 490 # host local 491 # periods -poll $LOADPOLL 492 # periods -exec $LOADEXEC 493 # periods -timeout 120 494 # npending 1 495 496 # task.exec 497 # stdout NULL 498 # stderr $LOGDIR/ns.chips.log 499 500 # book getpage nsData $ns_RchipPAGE -var date 501 # book getword nsData $date nsState -var ns_STATE 502 # book npages nsData -var Npages 503 504 # if ($VERBOSE > 5) 505 # echo "ns.chips.run: " $ns_RchipPAGE $date $ns_STATE $Npages 506 # end 485 507 486 $ns_RchipPAGE ++487 if ($ns_RchipPAGE >= $Npages) set ns_RchipPAGE = 0488 option $date489 490 if ("$ns_STATE" != "QUEUECHIPS") break491 $BURNTOOLING = 0492 $run = automate_stacks.pl --queue_chips --date $date493 command $run494 end495 # success496 task.exit 0497 # convert 'stdout' to book format498 book delpage nsData $options:0499 ipptool2book stdout nsData -uniq -key date500 501 book getword nsData $options:0 nsNmacros -var ns_Nmacros502 if ("$ns_Nmacros" != "NULL")503 for i 0 $ns_Nmacros504 sprintf macroName "ns%dMacro" $i505 book getword nsData $options:0 $macroName -var macroCmd506 $macroCmd507 end508 end509 510 if ($VERBOSE > 2)511 book listbook nsData512 end513 end514 515 # locked list516 task.exit default517 showcommand failure518 end519 task.exit crash520 showcommand crash521 end522 #operation times out?523 task.exit timeout524 showcommand timeout525 end526 end508 # $ns_RchipPAGE ++ 509 # if ($ns_RchipPAGE >= $Npages) set ns_RchipPAGE = 0 510 # option $date 511 512 # if ("$ns_STATE" != "QUEUECHIPS") break 513 # $BURNTOOLING = 0 514 # $run = automate_stacks.pl --queue_chips --date $date 515 # command $run 516 # end 517 # # success 518 # task.exit 0 519 # # convert 'stdout' to book format 520 # book delpage nsData $options:0 521 # ipptool2book stdout nsData -uniq -key date 522 523 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 524 # if ("$ns_Nmacros" != "NULL") 525 # for i 0 $ns_Nmacros 526 # sprintf macroName "ns%dMacro" $i 527 # book getword nsData $options:0 $macroName -var macroCmd 528 # $macroCmd 529 # end 530 # end 531 532 # if ($VERBOSE > 2) 533 # book listbook nsData 534 # end 535 # end 536 537 # # locked list 538 # task.exit default 539 # showcommand failure 540 # end 541 # task.exit crash 542 # showcommand crash 543 # end 544 # #operation times out? 545 # task.exit timeout 546 # showcommand timeout 547 # end 548 # end 527 549 528 550 … … 557 579 command $run 558 580 end 581 559 582 # success 560 583 task.exit 0 … … 718 741 end 719 742 720 # 721 # Generate a list of date ranges and chips that need to be processed with burntool722 # 723 task ns.burntool.load724 host local725 periods -poll $LOADPOLL726 periods -exec $LOADEXEC727 periods -timeout 30728 npending 1729 730 task.exec731 stdout NULL732 stderr $LOGDIR/ns.burntool.log733 734 book getpage nsData $ns_burnPAGE -var date735 book getword nsData $date nsState -var ns_STATE736 book npages nsData -var Npages737 738 if ($VERBOSE > 5)739 echo "ns.burntool.load: " $ns_burnPAGE $date $ns_STATE $Npages740 end741 742 $ns_burnPAGE ++743 if ($ns_burnPAGE >= $Npages) set ns_burnPAGE = 0744 option $date743 # # 744 # # Generate a list of date ranges and chips that need to be processed with burntool 745 # # 746 # task ns.burntool.load 747 # host local 748 # periods -poll $LOADPOLL 749 # periods -exec $LOADEXEC 750 # periods -timeout 30 751 # npending 1 752 753 # task.exec 754 # stdout NULL 755 # stderr $LOGDIR/ns.burntool.log 756 757 # book getpage nsData $ns_burnPAGE -var date 758 # book getword nsData $date nsState -var ns_STATE 759 # book npages nsData -var Npages 760 761 # if ($VERBOSE > 5) 762 # echo "ns.burntool.load: " $ns_burnPAGE $date $ns_STATE $Npages 763 # end 764 765 # $ns_burnPAGE ++ 766 # if ($ns_burnPAGE >= $Npages) set ns_burnPAGE = 0 767 # option $date 745 768 746 if ("$ns_STATE" != "NEEDSBURNING") break747 748 $run = automate_stacks.pl --define_burntool --date $date749 command $run750 end751 # success752 task.exit 0753 # convert 'stdout' to book format754 # book delpage nsBurntool $options:0755 ipptool2book stdout nsBurntool -uniq -key date756 book setword nsData $options:0 nsState "QUEUEBURNING"757 758 book getword nsData $options:0 nsNmacros -var ns_Nmacros759 if ("$ns_Nmacros" != "NULL")760 for i 0 $ns_Nmacros761 sprintf macroName "ns%dMacro" $i762 book getword nsData $options:0 $macroName -var macroCmd763 $macroCmd764 end765 end766 767 if ($VERBOSE > 2)768 book listbook nsData769 end770 end771 772 # locked list773 task.exit default774 showcommand failure775 end776 task.exit crash777 showcommand crash778 end779 #operation times out?780 task.exit timeout781 showcommand timeout782 end783 end784 785 # 786 # Magically run burntool on the data, based on the information stored in our book.787 # 788 task ns.burntool.run789 periods -poll $LOADPOLL790 periods -exec $LOADEXEC791 periods -timeout 10800792 npending 30793 task.exec794 stdout NULL795 stderr $LOGDIR/ns.burntool.log796 797 book getpage nsData $ns_RburnPAGE -var date798 book getword nsData $date nsState -var ns_STATE799 book npages nsData -var Npages800 801 if ($VERBOSE > 5)802 echo "ns.burntool.run: " $ns_RburnPAGE $date $ns_STATE $Npages803 end804 805 $ns_RburnPAGE ++806 if ($ns_RburnPAGE >= $Npages) set ns_RburnPAGE = 0807 if (("$ns_STATE" != "QUEUEBURNING")&&("$ns_STATE" != "BURNING")) break808 $BURNTOOLING = 1809 # Find out where in the list of jobs we are810 book getword nsBurntool $date btN -var btN811 book getword nsBurntool $date btNCounter -var btNcounter812 813 if ($VERBOSE > 5)814 echo "ns.burntool.run: Status: " $btNcounter $date815 end816 817 if ("$ns_STATE" == "QUEUEBURNING")818 $new_state = "QUEUEBURNING"819 end820 if ("$ns_STATE" == "BURNING")821 $new_state = "BURNING"822 end823 if ($btNcounter + 1 > $btN)824 $new_state = "BURNING"825 end826 if ($btNcounter > $btN)827 $btNcounter = 0828 end829 if ($VERBOSE > 5)830 echo "ns.burntool.run: Status: " $btNcounter $new_state831 end769 # if ("$ns_STATE" != "NEEDSBURNING") break 770 771 # $run = automate_stacks.pl --define_burntool --date $date 772 # command $run 773 # end 774 # # success 775 # task.exit 0 776 # # convert 'stdout' to book format 777 # # book delpage nsBurntool $options:0 778 # ipptool2book stdout nsBurntool -uniq -key date 779 # book setword nsData $options:0 nsState "QUEUEBURNING" 780 781 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 782 # if ("$ns_Nmacros" != "NULL") 783 # for i 0 $ns_Nmacros 784 # sprintf macroName "ns%dMacro" $i 785 # book getword nsData $options:0 $macroName -var macroCmd 786 # $macroCmd 787 # end 788 # end 789 790 # if ($VERBOSE > 2) 791 # book listbook nsData 792 # end 793 # end 794 795 # # locked list 796 # task.exit default 797 # showcommand failure 798 # end 799 # task.exit crash 800 # showcommand crash 801 # end 802 # #operation times out? 803 # task.exit timeout 804 # showcommand timeout 805 # end 806 # end 807 808 # # 809 # # Magically run burntool on the data, based on the information stored in our book. 810 # # 811 # task ns.burntool.run 812 # periods -poll $LOADPOLL 813 # periods -exec $LOADEXEC 814 # periods -timeout 10800 815 # npending 30 816 # task.exec 817 # stdout NULL 818 # stderr $LOGDIR/ns.burntool.log 819 820 # book getpage nsData $ns_RburnPAGE -var date 821 # book getword nsData $date nsState -var ns_STATE 822 # book npages nsData -var Npages 823 824 # if ($VERBOSE > 5) 825 # echo "ns.burntool.run: " $ns_RburnPAGE $date $ns_STATE $Npages 826 # end 827 828 # $ns_RburnPAGE ++ 829 # if ($ns_RburnPAGE >= $Npages) set ns_RburnPAGE = 0 830 # if (("$ns_STATE" != "QUEUEBURNING")&&("$ns_STATE" != "BURNING")) break 831 # $BURNTOOLING = 1 832 # # Find out where in the list of jobs we are 833 # book getword nsBurntool $date btN -var btN 834 # book getword nsBurntool $date btNCounter -var btNcounter 835 836 # if ($VERBOSE > 5) 837 # echo "ns.burntool.run: Status: " $btNcounter $date 838 # end 839 840 # if ("$ns_STATE" == "QUEUEBURNING") 841 # $new_state = "QUEUEBURNING" 842 # end 843 # if ("$ns_STATE" == "BURNING") 844 # $new_state = "BURNING" 845 # end 846 # if ($btNcounter + 1 > $btN) 847 # $new_state = "BURNING" 848 # end 849 # if ($btNcounter > $btN) 850 # $btNcounter = 0 851 # end 852 # if ($VERBOSE > 5) 853 # echo "ns.burntool.run: Status: " $btNcounter $new_state 854 # end 832 855 833 # Increment the counter in the book for the next job.834 $counter_update = $btNcounter + 1835 book setword nsBurntool $date btNCounter $counter_update836 # book setword nsData $options:0 nsState $options:1837 book setword nsData $date nsState $new_state838 839 # Get the current status of this job, and skip if it doesn't need to process.840 sprintf status_label "bt%dStatus" $btNcounter841 book getword nsBurntool $date $status_label -var status842 843 if ($VERBOSE > 5)844 echo "ns.burntool.run: Status: " $btNcounter $status $date $status_label845 end846 if (("$status" == "FINISHED")||("$status" == "RUN")) break856 # # Increment the counter in the book for the next job. 857 # $counter_update = $btNcounter + 1 858 # book setword nsBurntool $date btNCounter $counter_update 859 # # book setword nsData $options:0 nsState $options:1 860 # book setword nsData $date nsState $new_state 861 862 # # Get the current status of this job, and skip if it doesn't need to process. 863 # sprintf status_label "bt%dStatus" $btNcounter 864 # book getword nsBurntool $date $status_label -var status 865 866 # if ($VERBOSE > 5) 867 # echo "ns.burntool.run: Status: " $btNcounter $status $date $status_label 868 # end 869 # if (("$status" == "FINISHED")||("$status" == "RUN")) break 847 870 848 # Continue loading information to process this job849 sprintf start_date_label "bt%dBegin" $btNcounter850 sprintf end_date_label "bt%dEnd" $btNcounter851 sprintf class_count_label "bt%dClass" $btNcounter852 853 book getword nsBurntool $date $start_date_label -var start_date854 book getword nsBurntool $date $end_date_label -var end_date855 book getword nsBurntool $date $class_count_label -var chip_counter856 857 # Lookup class_id/host pairs858 list word -split $hostmatch:$chip_counter859 $class_id = $word:0860 $host = $word:1861 host $host862 # set.host.for.camera GPC1 $class_id863 $logfile = "/data/$host.0/burntool_logs/$class_id.$start_date.log"864 865 $run = ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $start_date --dateobs_end $end_date --dbname gpc1 --logfile $logfile871 # # Continue loading information to process this job 872 # sprintf start_date_label "bt%dBegin" $btNcounter 873 # sprintf end_date_label "bt%dEnd" $btNcounter 874 # sprintf class_count_label "bt%dClass" $btNcounter 875 876 # book getword nsBurntool $date $start_date_label -var start_date 877 # book getword nsBurntool $date $end_date_label -var end_date 878 # book getword nsBurntool $date $class_count_label -var chip_counter 879 880 # # Lookup class_id/host pairs 881 # list word -split $hostmatch:$chip_counter 882 # $class_id = $word:0 883 # $host = $word:1 884 # host $host 885 # # set.host.for.camera GPC1 $class_id 886 # $logfile = "/data/$host.0/burntool_logs/$class_id.$start_date.log" 887 888 # $run = ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $start_date --dateobs_end $end_date --dbname gpc1 --logfile $logfile 866 889 867 echo "ns.burntool.run: " $date $btN $btNcounter $start_date $end_date $chip_counter $class_id $host $logfile $run868 echo "ns.burntool.run: " $date $btN $btNcounter $chip_counter $new_state869 870 book setword nsBurntool $date $status_label RUN871 option $date $new_state $status_label872 873 command $run874 # command /bin/true875 end876 # success877 task.exit 0878 # convert 'stdout' to book format879 # Set data state based on if we're queueing or waiting880 # Set the job state for success.881 book setword nsBurntool $options:0 $options:2 FINISHED882 883 book getword nsData $options:0 nsNmacros -var ns_Nmacros884 if ("$ns_Nmacros" != "NULL")885 for i 0 $ns_Nmacros886 sprintf macroName "ns%dMacro" $i887 book getword nsData $options:0 $macroName -var macroCmd888 $macroCmd889 end890 end891 892 if ($VERBOSE > 2)893 book listbook nsData894 end895 end896 897 # locked list898 task.exit default899 book setword nsBurntool $options:0 $options:2 FAIL900 showcommand failure901 end902 task.exit crash903 book setword nsBurntool $options:0 $options:2 FAIL904 showcommand crash905 end906 #operation times out?907 task.exit timeout908 book setword nsBurntool $options:0 $options:2 FAIL909 showcommand timeout910 end911 end912 913 914 # 915 # This is all burntool related stuff.916 # 917 918 macro burntool919 if ($0 != 3)920 echo "USAGE: burntool (dateobs_begin) (dateobs_end)"921 break922 end923 924 for i 0 $hostmatch:n925 job -host $word:1 ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $1 --dateobs_end $2 --dbname gpc1 --logfile $logfile926 end927 end928 macro loadhosts929 for i 0 $allhosts:n930 controller host add $allhosts:$i931 end932 end933 934 # sorry this list is messy, it's supposed to be that way to try and keep to burntools from running on the same host at the same time.935 936 list hostmatch937 XY01 ipp014938 XY03 ipp038939 XY05 ipp023940 XY10 ipp039941 XY12 ipp024942 XY15 ipp040943 XY17 ipp020944 XY21 ipp041945 XY23 ipp042946 XY25 ipp043947 XY27 ipp028948 XY31 ipp044949 XY33 ipp029950 XY35 ipp045951 XY37 ipp030952 XY41 ipp046953 XY43 ipp031954 XY45 ipp047955 XY47 ipp032956 XY51 ipp048957 XY53 ipp033958 XY55 ipp049959 XY57 ipp034960 XY61 ipp050961 XY63 ipp035962 XY65 ipp051963 XY67 ipp036964 XY72 ipp052965 XY74 ipp015966 XY76 ipp053967 XY02 ipp014968 XY04 ipp038969 XY06 ipp023970 XY11 ipp039971 XY13 ipp024972 XY14 ipp040973 XY16 ipp020974 XY20 ipp041975 XY22 ipp042976 XY24 ipp043977 XY26 ipp028978 XY30 ipp044979 XY32 ipp029980 XY34 ipp045981 XY36 ipp030982 XY40 ipp046983 XY42 ipp031984 XY44 ipp047985 XY46 ipp032986 XY50 ipp048987 XY52 ipp033988 XY54 ipp049989 XY56 ipp034990 XY60 ipp050991 XY62 ipp035992 XY64 ipp051993 XY66 ipp036994 XY71 ipp052995 XY73 ipp015996 XY75 ipp053997 end998 999 list allhosts1000 ipp0431001 ipp0141002 ipp0151003 ipp0231004 ipp0241005 ipp0201006 ipp0281007 ipp0291008 ipp0301009 ipp0311010 ipp0321011 ipp0331012 ipp0341013 ipp0351014 ipp0361015 ipp0381016 ipp0391017 ipp0401018 ipp0411019 ipp0421020 ipp0441021 ipp0451022 ipp0461023 ipp0471024 ipp0481025 ipp0491026 ipp0501027 ipp0511028 ipp0521029 ipp0531030 end890 # echo "ns.burntool.run: " $date $btN $btNcounter $start_date $end_date $chip_counter $class_id $host $logfile $run 891 # echo "ns.burntool.run: " $date $btN $btNcounter $chip_counter $new_state 892 893 # book setword nsBurntool $date $status_label RUN 894 # option $date $new_state $status_label 895 896 # command $run 897 # # command /bin/true 898 # end 899 # # success 900 # task.exit 0 901 # # convert 'stdout' to book format 902 # # Set data state based on if we're queueing or waiting 903 # # Set the job state for success. 904 # book setword nsBurntool $options:0 $options:2 FINISHED 905 906 # book getword nsData $options:0 nsNmacros -var ns_Nmacros 907 # if ("$ns_Nmacros" != "NULL") 908 # for i 0 $ns_Nmacros 909 # sprintf macroName "ns%dMacro" $i 910 # book getword nsData $options:0 $macroName -var macroCmd 911 # $macroCmd 912 # end 913 # end 914 915 # if ($VERBOSE > 2) 916 # book listbook nsData 917 # end 918 # end 919 920 # # locked list 921 # task.exit default 922 # book setword nsBurntool $options:0 $options:2 FAIL 923 # showcommand failure 924 # end 925 # task.exit crash 926 # book setword nsBurntool $options:0 $options:2 FAIL 927 # showcommand crash 928 # end 929 # #operation times out? 930 # task.exit timeout 931 # book setword nsBurntool $options:0 $options:2 FAIL 932 # showcommand timeout 933 # end 934 # end 935 936 937 # # 938 # # This is all burntool related stuff. 939 # # 940 941 # macro burntool 942 # if ($0 != 3) 943 # echo "USAGE: burntool (dateobs_begin) (dateobs_end)" 944 # break 945 # end 946 947 # for i 0 $hostmatch:n 948 # job -host $word:1 ipp_apply_burntool.pl --class_id $class_id --dateobs_begin $1 --dateobs_end $2 --dbname gpc1 --logfile $logfile 949 # end 950 # end 951 # macro loadhosts 952 # for i 0 $allhosts:n 953 # controller host add $allhosts:$i 954 # end 955 # end 956 957 # # sorry this list is messy, it's supposed to be that way to try and keep to burntools from running on the same host at the same time. 958 959 # list hostmatch 960 # XY01 ipp014 961 # XY03 ipp038 962 # XY05 ipp023 963 # XY10 ipp039 964 # XY12 ipp024 965 # XY15 ipp040 966 # XY17 ipp020 967 # XY21 ipp041 968 # XY23 ipp042 969 # XY25 ipp043 970 # XY27 ipp028 971 # XY31 ipp044 972 # XY33 ipp029 973 # XY35 ipp045 974 # XY37 ipp030 975 # XY41 ipp046 976 # XY43 ipp031 977 # XY45 ipp047 978 # XY47 ipp032 979 # XY51 ipp048 980 # XY53 ipp033 981 # XY55 ipp049 982 # XY57 ipp034 983 # XY61 ipp050 984 # XY63 ipp035 985 # XY65 ipp051 986 # XY67 ipp036 987 # XY72 ipp052 988 # XY74 ipp015 989 # XY76 ipp053 990 # XY02 ipp014 991 # XY04 ipp038 992 # XY06 ipp023 993 # XY11 ipp039 994 # XY13 ipp024 995 # XY14 ipp040 996 # XY16 ipp020 997 # XY20 ipp041 998 # XY22 ipp042 999 # XY24 ipp043 1000 # XY26 ipp028 1001 # XY30 ipp044 1002 # XY32 ipp029 1003 # XY34 ipp045 1004 # XY36 ipp030 1005 # XY40 ipp046 1006 # XY42 ipp031 1007 # XY44 ipp047 1008 # XY46 ipp032 1009 # XY50 ipp048 1010 # XY52 ipp033 1011 # XY54 ipp049 1012 # XY56 ipp034 1013 # XY60 ipp050 1014 # XY62 ipp035 1015 # XY64 ipp051 1016 # XY66 ipp036 1017 # XY71 ipp052 1018 # XY73 ipp015 1019 # XY75 ipp053 1020 # end 1021 1022 # list allhosts 1023 # ipp043 1024 # ipp014 1025 # ipp015 1026 # ipp023 1027 # ipp024 1028 # ipp020 1029 # ipp028 1030 # ipp029 1031 # ipp030 1032 # ipp031 1033 # ipp032 1034 # ipp033 1035 # ipp034 1036 # ipp035 1037 # ipp036 1038 # ipp038 1039 # ipp039 1040 # ipp040 1041 # ipp041 1042 # ipp042 1043 # ipp044 1044 # ipp045 1045 # ipp046 1046 # ipp047 1047 # ipp048 1048 # ipp049 1049 # ipp050 1050 # ipp051 1051 # ipp052 1052 # ipp053 1053 # end -
trunk/ippTasks/register.pro
r25418 r30049 8 8 book init regPendingImfile 9 9 book init regPendingExp 10 book init regPendingBurntoolImfile 10 11 11 12 macro register.reset 12 13 book init regPendingImfile 13 14 book init regPendingExp 15 book init regPendingBurntoolImfile 14 16 end 15 17 … … 18 20 book listbook regPendingImfile 19 21 book listbook regPendingExp 22 book listbook regPendingBurntoolImfile 20 23 end 21 24 … … 33 36 active true 34 37 end 38 task register.burntool.load 39 active true 40 end 41 task register.burntool.run 42 active true 43 end 35 44 end 36 45 … … 48 57 active false 49 58 end 50 end 59 task register.burntool.load 60 active false 61 end 62 task register.burntool.run 63 active false 64 end 65 end 66 67 $valid_burntool_value = 14 51 68 52 69 macro replace.survey.values … … 129 146 # these variables will cycle through the known database names 130 147 $regPendingImfile_DB = 0 148 $regPendingBurntoolImfile_DB = 0 131 149 $regPendingExp_DB = 0 132 150 … … 429 447 end 430 448 449 450 # select imfiles that can now be burntooled. 451 task register.burntool.load 452 host local 453 454 periods -poll $LOADPOLL 455 periods -exec $LOADEXEC 456 periods -timeout 30 457 npending 1 458 459 # silently drop stdout 460 stdout NULL 461 stderr $LOGDIR/register.burntool.load.log 462 463 # select entried from the current DB; cycle to the next DB, if it exists 464 task.exec 465 $run = regtool -pendingburntoolimfile 466 $today = `date -u +%Y-%m-%d` 467 # debugging purposes 468 $today = "2010-12-06" 469 $run = $run -date $today -valid_burntool $valid_burntool_value 470 if ($DB:n == 0) 471 option DEFAULT 472 else 473 # save the DB name for the exit tasks 474 option $DB:$regPendingBurntoolImfile_DB 475 $run = $run -dbname $DB:$regPendingBurntoolImfile_DB 476 $regPendingBurntoolImfile_DB ++ 477 if ($regPendingBurntoolImfile_DB >= $DB:n) set regPendingBurntoolImfile_DB = 0 478 end 479 480 echo $run 481 add_poll_args run 482 command $run 483 end 484 485 # success 486 task.exit $EXIT_SUCCESS 487 # convert 'stdout' to book format 488 ipptool2book stdout regPendingBurntoolImfile -key exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 489 book shuffle regPendingBurntoolImfile 490 if ($VERBOSE > 2) 491 book listbook regPendingBurntoolImfile 492 end 493 494 # delete existing entries in the appropriate pantasksStates 495 process_cleanup regPendingBurntoolImfile 496 end 497 498 # locked list 499 task.exit default 500 showcommand failure 501 end 502 task.exit crash 503 showcommand crash 504 end 505 task.exit timeout 506 showcommand timeout 507 end 508 end 509 510 # run the ipp_apply_burntool_single.pl script on the pending images 511 task register.burntool.run 512 periods -poll $RUNPOLL 513 periods -exec $RUNEXEC 514 periods -timeout 30 515 516 task.exec 517 if ($NETWORK == 0) break 518 book npages regPendingBurntoolImfile -var N 519 if ($N == 0) 520 periods -exec $RUNEXEC 521 break 522 end 523 periods -exec 0.05 524 525 # look for new images to burn in regPendingBurntoolImfile 526 book getpage regPendingBurntoolImfile 0 -var pageName -key pantaskState INIT 527 if ("$pageName" == "NULL") break 528 529 book setword regPendingBurntoolImfile $pageName pantaskState RUN 530 531 book getword regPendingBurntoolImfile $pageName exp_id -var EXP_ID 532 book getword regPendingBurntoolImfile $pageName class_id -var CLASS_ID 533 book getword regPendingBurntoolImfile $pageName uri -var THIS_URI 534 book getword regPendingBurntoolImfile $pageName previous_uri -var PREVIOUS_URI 535 book getword regPendingBurntoolImfile $pageName camera -var CAMERA 536 book getword regPendingBurntoolImfile $pageName dbname -var DBNAME 537 set.host.for.camera $CAMERA $CLASS_ID 538 539 stdout $LOGDIR/register.burntool.run.log 540 stderr $LOGDIR/register.burntool.run.log 541 542 $run = ipp_apply_burntool_single.pl --exp_id $EXP_ID --class_id $CLASS_ID --this_uri $THIS_URI 543 if ("$PREVIOUS_URI" != "NULL") 544 $run = $run --previous_uri $PREVIOUS_URI 545 end 546 547 add_standard_args run 548 549 options $pageName 550 551 if ($VERBOSE > 1) 552 echo command $run 553 end 554 command $run 555 end 556 557 # default exit status 558 task.exit default 559 process_exit regPendingBurntoolImfile $options:0 $JOB_STATUS 560 end 561 562 # locked list 563 task.exit crash 564 showcommand crash 565 echo "hostname: $JOB_HOSTNAME" 566 book setword regPendingBurntoolImfile $options:0 pantaskState CRASH 567 end 568 569 # operation timed out 570 task.exit timeout 571 showcommand timeout 572 book setword regPendingBurntoolImfile $options:0 pantaskState TIMEOUT 573 end 574 end 575 576 577 578 431 579 ## XXX add a global path to output files -
trunk/ippTools/share/Makefile.am
r29717 r30049 316 316 receivetool_revert.sql \ 317 317 receivetool_toadvance.sql \ 318 regtool_checkburntoolimfile.sql \ 318 319 regtool_create_dup_table.sql \ 319 320 regtool_export_exp.sql \ … … 331 332 regtool_updatebyquery.sql \ 332 333 regtool_updatebyqueryimfile.sql \ 334 regtool_pendingburntoolimfile.sql \ 333 335 stacktool_associationdefine_select.sql \ 334 336 stacktool_definebyquery_insert.sql \ -
trunk/ippTools/share/camtool_find_pendingimfile.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/ippTools/share/chiptool_find_rawexp.sql
r23917 r30049 1 1 -- this query is used to find potental rawExps to be queued for chiptool 2 2 -- processeing 3 SELECT 3 SELECT DISTINCT 4 4 rawExp.*, 5 5 newExp.label 6 6 FROM rawExp 7 7 JOIN newExp using (exp_id) 8 LEFT JOIN chipRun USING (exp_id) 8 9 WHERE 9 10 rawExp.fault = 0 -
trunk/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed
/branches/czw_branch/20101203/ippTools/share/pxadmin_create_tables.sql (added) merged: 29965,29982
r29962 r30049 9 9 uri VARCHAR(255), 10 10 epoch TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 11 use_compress SMALLINT, 11 12 PRIMARY KEY(camera, telescope) 12 13 ) ENGINE=innodb DEFAULT CHARSET=latin1; … … 251 252 md5sum VARCHAR(32), 252 253 burntool_state SMALLINT, 254 video_cells TINYINT DEFAULT 0, 253 255 PRIMARY KEY(exp_id, class_id), 254 256 KEY(tmp_class_id), - Property svn:mergeinfo changed
-
trunk/ippTools/share/regtool_pendingexp.sql
r20759 r30049 39 39 newExp.state = 'run' 40 40 AND rawExp.exp_id IS NULL 41 AND rawImfile.data_state = 'full' 41 42 -- where hook %s 42 43 GROUP BY -
trunk/ippTools/src
- Property svn:mergeinfo changed
/branches/czw_branch/20101203/ippTools/src (added) merged: 29908,29965,29982,30014
- Property svn:mergeinfo changed
-
trunk/ippTools/src/chiptool.c
r29902 r30049 271 271 272 272 // default 273 PXOPT_LOOKUP_BOOL(unique, config->args, "-unique", false); 273 274 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 274 275 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 275 276 276 277 // find the exp_id of all the exposures that we want to queue up. 277 278 psString query = pxDataGet("chiptool_find_rawexp.sql"); … … 288 289 psFree(where); 289 290 291 if (unique) { 292 psStringAppend(&query, "AND chip_id IS NULL"); 293 } 294 290 295 if (!p_psDBRunQuery(config->dbh, query)) { 291 296 psError(PS_ERR_UNKNOWN, false, "database error"); -
trunk/ippTools/src/chiptoolConfig.c
r29902 r30049 61 61 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_dist_group", 0, "define distribution group", NULL); 62 62 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_note", 0, "define note", NULL); 63 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-unique", 0, "only queue exposures that have no previous chipRun", false); 63 64 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend", 0, "do not actually modify the database", false); 64 65 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); -
trunk/ippTools/src/pztool.c
r27053 r30049 112 112 PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", true, false); 113 113 PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false); 114 114 115 115 if (!pzDataStoreInsert(config->dbh, 116 116 camera, -
trunk/ippTools/src/regtool.c
r27748 r30049 34 34 static bool pendingimfileMode(pxConfig *config); 35 35 static bool addprocessedimfileMode(pxConfig *config); 36 static bool checkburntoolimfileMode(pxConfig *config); 37 static bool pendingburntoolimfileMode(pxConfig *config); 36 38 static bool processedimfileMode(pxConfig *config); 37 39 static bool revertprocessedimfileMode(pxConfig *config); … … 72 74 // imfile 73 75 MODECASE(REGTOOL_MODE_PENDINGIMFILE, pendingimfileMode); 76 MODECASE(REGTOOL_MODE_CHECKBURNTOOLIMFILE, checkburntoolimfileMode); 77 MODECASE(REGTOOL_MODE_PENDINGBURNTOOLIMFILE, pendingburntoolimfileMode); 74 78 MODECASE(REGTOOL_MODE_ADDPROCESSEDIMFILE, addprocessedimfileMode); 75 79 MODECASE(REGTOOL_MODE_PROCESSEDIMFILE, processedimfileMode); … … 176 180 } 177 181 182 static bool checkburntoolimfileMode(pxConfig *config) 183 { 184 PS_ASSERT_PTR_NON_NULL(config,false); 185 186 // required 187 PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", true, false); 188 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 189 PXOPT_LOOKUP_STR(date, config->args, "-date", true, false); 190 PXOPT_LOOKUP_S32(valid_burntool, config->args, "-valid_burntool", true, false); 191 // optional 192 PXOPT_LOOKUP_STR(camera, config->args, "-inst", false, false); 193 PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", false, false); 194 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 195 psString query = pxDataGet("regtool_checkburntoolimfile.sql"); 196 if (!query) { 197 psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement"); 198 return false; 199 } 200 psString rep = psStringCopy(query); 201 psFree(query); 202 query = rep; 203 204 psStringSubstitute(&query,exp_name,"@EXP_NAME@"); 205 psStringSubstitute(&query,class_id,"@CLASS_ID@"); 206 psStringSubstitute(&query,date,"@DATE@"); 207 208 fprintf(stderr,"%s",query); 209 210 if (!p_psDBRunQuery(config->dbh, query)) { 211 // XXX PS_EXIT_PROG_ERROR (incorrect SQL) or SYS_ERROR (database comms) 212 psError(PXTOOLS_ERR_PROG, false, "database error"); 213 psFree(query); 214 return false; 215 } 216 psFree(query); 217 218 psArray *output = p_psDBFetchResult(config->dbh); 219 if (!output) { 220 psErrorCode err = psErrorCodeLast(); 221 switch (err) { 222 case PS_ERR_DB_CLIENT: 223 psError(PXTOOLS_ERR_SYS, false, "database error"); 224 case PS_ERR_DB_SERVER: 225 psError(PXTOOLS_ERR_PROG, false, "database error"); 226 default: 227 psError(PXTOOLS_ERR_PROG, false, "unknown error"); 228 } 229 230 return false; 231 } 232 if (!psArrayLength(output)) { 233 psTrace("regtool", PS_LOG_INFO, "no rows found"); 234 psFree(output); 235 return true; 236 } 237 238 psString previous_uri = NULL; 239 bool ok_to_burn = true; 240 bool already_burned = true; 241 for (long i = 0; i < output->n; i++) { 242 psMetadata *row = output->data[i]; 243 244 if ((psMetadataLookupS32(NULL,row,"is_downloaded") != 1)|| 245 (psMetadataLookupS32(NULL,row,"is_registered") != 1)) { 246 ok_to_burn = false; 247 } 248 if (already_burned == false) { 249 ok_to_burn = false; 250 } 251 if (abs(psMetadataLookupS32(NULL,row,"burntool_state")) == valid_burntool) { 252 already_burned = true; 253 } 254 else { 255 already_burned = false; 256 } 257 258 if (previous_uri) { 259 psMetadataAddStr(row,PS_LIST_TAIL,"previous_uri",PS_META_REPLACE,"",previous_uri); 260 psFree(previous_uri); 261 } 262 psMetadataAddBool(row,PS_LIST_TAIL,"burnable",PS_META_REPLACE,"",ok_to_burn); 263 psMetadataAddBool(row,PS_LIST_TAIL,"already_burned",PS_META_REPLACE,"",already_burned); 264 previous_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); 265 } 266 267 // negate simple so the default is true 268 if (!ippdbPrintMetadatas(stdout, output, "regBurntoolImfile", !simple)) { 269 psError(PXTOOLS_ERR_PROG, false, "failed to print array"); 270 psFree(output); 271 return false; 272 } 273 274 psFree(output); 275 276 277 return(true); 278 279 } 280 281 static bool pendingburntoolimfileMode(pxConfig *config) 282 { 283 PS_ASSERT_PTR_NON_NULL(config,false); 284 285 // required 286 PXOPT_LOOKUP_STR(date, config->args, "-date", true, false); 287 PXOPT_LOOKUP_S32(valid_burntool, config->args, "-valid_burntool", true, false); 288 // optional 289 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 290 PXOPT_LOOKUP_BOOL(ignore_state, config->args, "-ignore_state", false); 291 psString query = pxDataGet("regtool_pendingburntoolimfile.sql"); 292 if (!query) { 293 psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement"); 294 return false; 295 } 296 psString rep = psStringCopy(query); 297 psFree(query); 298 query = rep; 299 300 psStringSubstitute(&query,date,"@DATE@"); 301 302 fprintf(stderr,"%s",query); 303 304 if (!p_psDBRunQuery(config->dbh, query)) { 305 // XXX PS_EXIT_PROG_ERROR (incorrect SQL) or SYS_ERROR (database comms) 306 psError(PXTOOLS_ERR_PROG, false, "database error"); 307 psFree(query); 308 return false; 309 } 310 psFree(query); 311 312 psArray *output = p_psDBFetchResult(config->dbh); 313 if (!output) { 314 psErrorCode err = psErrorCodeLast(); 315 switch (err) { 316 case PS_ERR_DB_CLIENT: 317 psError(PXTOOLS_ERR_SYS, false, "database error"); 318 case PS_ERR_DB_SERVER: 319 psError(PXTOOLS_ERR_PROG, false, "database error"); 320 default: 321 psError(PXTOOLS_ERR_PROG, false, "unknown error"); 322 } 323 324 return false; 325 } 326 if (!psArrayLength(output)) { 327 psTrace("regtool", PS_LOG_INFO, "no rows found"); 328 psFree(output); 329 return true; 330 } 331 332 psString previous_uri = NULL; 333 psString this_uri = NULL; 334 bool ok_to_burn = true; 335 bool already_burned = true; 336 psString previous_class_id = NULL; 337 psString this_class_id = NULL; 338 psArray *results = psArrayAllocEmpty(60); // List of suggested imfiles to burntool. 339 340 for (long i = 0; i < output->n; i++) { 341 psMetadata *row = output->data[i]; 342 343 // Add the information about this row and the previous, if it exists. 344 // Write the class_id stuff for debugging. 345 this_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id")); 346 psStringSubstitute(&this_class_id,"XY","ota"); 347 psMetadataAddStr(row,PS_LIST_TAIL,"this_class_id",PS_META_REPLACE,"",this_class_id); 348 if (previous_class_id) { 349 psMetadataAddStr(row,PS_LIST_TAIL,"previous_class_id",PS_META_REPLACE,"",previous_class_id); 350 } 351 352 // Determine if we've crossed a class_id boundary, as this resets the bits. 353 if (previous_class_id) { 354 if (strcmp(this_class_id,previous_class_id) != 0) { 355 ok_to_burn = true; 356 already_burned = true; 357 previous_uri = NULL; 358 } 359 } 360 361 // Write the URIs as well. 362 this_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); // Duplicate, but helpful for my debugging. 363 psMetadataAddStr(row,PS_LIST_TAIL,"this_uri",PS_META_REPLACE,"",this_uri); 364 if (previous_uri) { 365 psMetadataAddStr(row,PS_LIST_TAIL,"previous_uri",PS_META_REPLACE,"",previous_uri); 366 } 367 368 // Check the two status variables 369 // Convert bits of the SQL query into booleans describing the data state 370 if ((psMetadataLookupS32(NULL,row,"is_downloaded") != 1)|| 371 (psMetadataLookupS32(NULL,row,"is_registered") != 1)) { 372 ok_to_burn = false; 373 } 374 if (already_burned == false) { 375 ok_to_burn = false; 376 } 377 if (abs(psMetadataLookupS32(NULL,row,"burntool_state")) == valid_burntool) { 378 already_burned = true; 379 } 380 else { 381 already_burned = false; 382 } 383 psMetadataAddBool(row,PS_LIST_TAIL,"burnable",PS_META_REPLACE,"",ok_to_burn); 384 psMetadataAddBool(row,PS_LIST_TAIL,"already_burned",PS_META_REPLACE,"",already_burned); 385 386 // Check the uri for this exposure 387 if (!this_uri) { 388 ok_to_burn = false; 389 already_burned = false; 390 391 // Save this round for next round. 392 psFree(previous_class_id); 393 psFree(previous_uri); 394 previous_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id")); 395 psStringSubstitute(&previous_class_id,"XY","ota"); 396 previous_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); // Save for next round. 397 continue; 398 } 399 400 // printf("STATUS: %s %s %s %s (%d %d)\n",this_uri,previous_uri,this_class_id,previous_class_id,ok_to_burn,already_burned); 401 402 // If the state of this imfile is not "pending_burntool" then we can't burn it. 403 if (!ignore_state) { 404 psString imfile_state = psMetadataLookupStr(NULL,row,"imfile_state"); 405 406 if (!imfile_state) { // imfile state is NULL, so we probably aren't registered. 407 ok_to_burn = false; 408 409 // Save this round for next round. 410 psFree(previous_class_id); 411 psFree(previous_uri); 412 previous_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id")); 413 psStringSubstitute(&previous_class_id,"XY","ota"); 414 previous_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); // Save for next round. 415 continue; 416 } 417 if (strcmp("pending_burntool",imfile_state) != 0) { // Probably the state is full, do not twiddle states 418 // Save this round for next round. 419 psFree(previous_class_id); 420 psFree(previous_uri); 421 previous_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id")); 422 psStringSubstitute(&previous_class_id,"XY","ota"); 423 previous_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); // Save for next round. 424 continue; 425 } 426 } 427 428 // Determine if we've already suggested an entry for this ota, and if not, copy this 429 // suggestion into our output result list. 430 if (!ok_to_burn || already_burned) { 431 // Save this round for next round. 432 psFree(previous_class_id); 433 psFree(previous_uri); 434 previous_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id")); 435 psStringSubstitute(&previous_class_id,"XY","ota"); 436 previous_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); // Save for next round. 437 continue; 438 } 439 // If we're here, then we think we could potentially burntool this file. 440 psArrayAdd(results,results->n,row); 441 442 // Save this round for next round. 443 psFree(previous_class_id); 444 psFree(previous_uri); 445 previous_class_id = psStringCopy(psMetadataLookupStr(NULL,row,"tmp_class_id")); 446 psStringSubstitute(&previous_class_id,"XY","ota"); 447 previous_uri = psStringCopy(psMetadataLookupStr(NULL,row,"uri")); // Save for next round. 448 } 449 450 // negate simple so the default is true 451 if (!ippdbPrintMetadatas(stdout, results, "regPendingBurntoolImfile", !simple)) { 452 psError(PXTOOLS_ERR_PROG, false, "failed to print array"); 453 psFree(output); 454 psFree(results); 455 return false; 456 } 457 458 psFree(output); 459 psFree(results); 460 461 462 return(true); 463 464 } 465 466 178 467 179 468 static bool addprocessedimfileMode(pxConfig *config) … … 250 539 PXOPT_LOOKUP_S32(bytes, config->args, "-bytes", false, false); 251 540 PXOPT_LOOKUP_STR(md5sum, config->args, "-md5sum", false, false); 252 541 PXOPT_LOOKUP_BOOL(video_cells, config->args, "-video_cells", false); 542 253 543 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 254 544 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); … … 323 613 bytes, 324 614 md5sum, 615 video_cells, 325 616 0 // burntool_state 326 617 )) { … … 809 1100 PXOPT_LOOKUP_F32(moon_phase, config->args, "-moon_phase", false, false); 810 1101 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 1102 PXOPT_LOOKUP_STR(data_group, config->args, "-data_group", false, false); 1103 PXOPT_LOOKUP_STR(dist_group, config->args, "-dist_group", false, false); 1104 PXOPT_LOOKUP_STR(chip_workdir,config->args, "-chip_workdir", false, false); 811 1105 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 812 1106 … … 1008 1302 // else continue on... 1009 1303 1010 1304 chip_workdir = chip_workdir ? chip_workdir : workdir; 1011 1305 // insert an entry into the chipPendingExp table 1012 1306 // this can only be run as the newExp's state has been set to stop 1013 1307 if (!pxchipQueueByExpTag(config, 1014 1308 exp_id, 1015 workdir,1309 chip_workdir, 1016 1310 label, 1017 NULL, // data_group 1018 NULL, // dist_group 1311 data_group, 1312 dist_group, 1019 1313 reduction, 1020 1314 NULL, // expgroup … … 1092 1386 PXOPT_COPY_F64(config->args, where, "-posang_min", "posang", ">="); 1093 1387 PXOPT_COPY_F64(config->args, where, "-posang_max", "posang", "<"); 1094 PXOPT_COPY_STR(config->args, where, "-object", "object", "=="); 1388 PXOPT_COPY_STR(config->args, where, "-object", "object", "LIKE"); 1389 PXOPT_COPY_STR(config->args, where, "-obs_mode", "obs_mode", "LIKE"); 1390 PXOPT_COPY_STR(config->args, where, "-comment", "comment", "LIKE"); 1095 1391 PXOPT_COPY_F32(config->args, where, "-sun_angle_min", "sun_angle", ">="); 1096 1392 PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "sun_angle", "<"); -
trunk/ippTools/src/regtool.h
r27149 r30049 26 26 REGTOOL_MODE_NONE = 0x0, 27 27 REGTOOL_MODE_PENDINGIMFILE, 28 REGTOOL_MODE_CHECKBURNTOOLIMFILE, 29 REGTOOL_MODE_PENDINGBURNTOOLIMFILE, 28 30 REGTOOL_MODE_ADDPROCESSEDIMFILE, 29 31 REGTOOL_MODE_PROCESSEDIMFILE, -
trunk/ippTools/src/regtoolConfig.c
r27748 r30049 53 53 ADD_OPT(Bool, pendingimfileArgs, "-simple", "use the simple output format", false); 54 54 55 // -checkburntoolimfile 56 psMetadata *checkburntoolimfileArgs = psMetadataAlloc(); 57 ADD_OPT(Str, checkburntoolimfileArgs, "-exp_name", "define the exp_name (required)", NULL); 58 ADD_OPT(Str, checkburntoolimfileArgs, "-class_id", "define class ID (required)", NULL); 59 ADD_OPT(Str, checkburntoolimfileArgs, "-date", "select the date to process (required)", NULL); 60 ADD_OPT(S32, checkburntoolimfileArgs, "-valid_burntool", "define the good burntool value (required)", 0); 61 ADD_OPT(Str, checkburntoolimfileArgs, "-inst", "define the camera name", NULL); 62 ADD_OPT(Str, checkburntoolimfileArgs, "-telescope", "define the telescope name", NULL); 63 ADD_OPT(Bool, checkburntoolimfileArgs, "-simple", "use the simple output format", false); 64 65 // -pendingburntoolimfile 66 psMetadata *pendingburntoolimfileArgs = psMetadataAlloc(); 67 ADD_OPT(Str, pendingburntoolimfileArgs, "-date", "select the date to process (required)", NULL); 68 ADD_OPT(S32, pendingburntoolimfileArgs, "-valid_burntool", "define the good burntool value (required)", 0); 69 ADD_OPT(Bool, pendingburntoolimfileArgs, "-simple", "use the simple output format", false); 70 ADD_OPT(Bool, pendingburntoolimfileArgs, "-ignore_state", "ignore the data_state when deciding what to work on", false); 71 ADD_OPT(U64, pendingburntoolimfileArgs, "-limit", "limit result set to N items", 0); 72 55 73 // -addprocessedimfile 56 74 psMetadata *addprocessedimfileArgs = psMetadataAlloc(); … … 128 146 ADD_OPT(S32, addprocessedimfileArgs, "-bytes", "define bytes", 0); 129 147 ADD_OPT(S16, addprocessedimfileArgs, "-burntool_state", "set burntool state", 0); 148 ADD_OPT(Bool, addprocessedimfileArgs, "-video_cells", "define if chip has video cells", false); 130 149 ADD_OPT(S16, addprocessedimfileArgs, "-fault", "set fault code", 0); 131 150 ADD_OPT(S16, addprocessedimfileArgs, "-quality", "set quality flag", 0); … … 249 268 ADD_OPT(F32, addprocessedexpArgs, "-moon_phase", "define moon phase (0.0 = new)", NAN); 250 269 ADD_OPT(Str, addprocessedexpArgs, "-label", "define label for chip stage (non-detrend data only)", NULL); 270 ADD_OPT(Str, addprocessedexpArgs, "-data_group", "define data_group for chip stage (non-detrend data only)", NULL); 271 ADD_OPT(Str, addprocessedexpArgs, "-dist_group", "define dist_group for chip stage (non-detrend data only)", NULL); 272 ADD_OPT(Str, addprocessedexpArgs, "-chip_workdir", "define workdir for chip stage (non-detrend data only)", NULL); 251 273 ADD_OPT(Str, addprocessedexpArgs, "-hostname", "define host name", NULL); 252 274 ADD_OPT(S16, addprocessedexpArgs, "-fault", "set fault code", 0); … … 291 313 psMetadataAddF64(processedexpArgs, PS_LIST_TAIL, "-posang_max", 0, "search by max rotator position angle", NAN); 292 314 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-object", 0, "search by exposure object", NULL); 315 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-obs_mode", 0, "search by exposure obs_mode", NULL); 316 psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-comment", 0, "search by exposure comment", NULL); 317 293 318 psMetadataAddF32(processedexpArgs, PS_LIST_TAIL, "-sun_angle_min", 0, "define min solar angle", NAN); 294 319 psMetadataAddF32(processedexpArgs, PS_LIST_TAIL, "-sun_angle_max", 0, "define max solar angle", NAN); … … 395 420 396 421 PXOPT_ADD_MODE("-pendingimfile", "", REGTOOL_MODE_PENDINGIMFILE, pendingimfileArgs); 422 PXOPT_ADD_MODE("-checkburntoolimfile", "", REGTOOL_MODE_CHECKBURNTOOLIMFILE, checkburntoolimfileArgs); 423 PXOPT_ADD_MODE("-pendingburntoolimfile", "", REGTOOL_MODE_PENDINGBURNTOOLIMFILE, pendingburntoolimfileArgs); 397 424 PXOPT_ADD_MODE("-addprocessedimfile", "", REGTOOL_MODE_ADDPROCESSEDIMFILE, addprocessedimfileArgs); 398 425 PXOPT_ADD_MODE("-processedimfile", "", REGTOOL_MODE_PROCESSEDIMFILE, processedimfileArgs); -
trunk/ippconfig
- Property svn:mergeinfo changed
/branches/czw_branch/20101203/ippconfig (added) merged: 29965,30014,30017-30018,30048
- Property svn:mergeinfo changed
-
trunk/ippconfig/gpc1/format_20080925.config
r27664 r30049 235 235 CELL.YPARITY STR ATM2_2 236 236 237 CHIP.VIDEOCELL STR CELLMODE 237 238 # XY24 is bad, so get it from the database; all others from header 238 239 CHIP.TEMP.DEPEND STR CHIP.NAME -
trunk/ippconfig/gpc1/format_20080929.config
r27664 r30049 230 230 CELL.YPARITY STR ATM2_2 231 231 232 CHIP.VIDEOCELL STR CELLMODE 232 233 # XY24 is bad, so get it from the database; all others from header 233 234 CHIP.TEMP.DEPEND STR CHIP.NAME -
trunk/ippconfig/gpc1/format_20081011.config
r27664 r30049 221 221 CELL.YPARITY STR ATM2_2 222 222 223 CHIP.VIDEOCELL STR CELLMODE 223 224 # XY24 is bad, so get it from the database; all others from header 224 225 CHIP.TEMP.DEPEND STR CHIP.NAME -
trunk/ippconfig/gpc1/format_20090120.config
r27664 r30049 209 209 210 210 FPA.BURNTOOL.APPLIED STR BTOOLAPP 211 CHIP.VIDEOCELL STR CELLMODE 211 212 212 213 FPA.PON.TIME STR PONTIME -
trunk/ippconfig/gpc1/format_20090220.config
r27664 r30049 209 209 210 210 FPA.BURNTOOL.APPLIED STR BTOOLAPP 211 CHIP.VIDEOCELL STR CELLMODE 211 212 212 213 FPA.PON.TIME STR PONTIME -
trunk/ippconfig/gpc1/format_20100122.config
r28552 r30049 209 209 210 210 FPA.BURNTOOL.APPLIED STR BTOOLAPP 211 CHIP.VIDEOCELL STR CELLMODE 211 212 212 213 FPA.PON.TIME STR PONTIME -
trunk/ippconfig/gpc1/format_orig.config
r27664 r30049 217 217 218 218 FPA.BURNTOOL.APPLIED STR BTOOLAPP 219 CHIP.VIDEOCELL STR CELLMODE 219 220 220 221 FPA.PON.TIME STR PONTIME -
trunk/ippconfig/recipes/nightly_science.config
r29985 r30049 1 RETENTION_TIME U16 90002 3 1 CLEAN_MODES MULTI 4 2 CLEAN_MODES METADATA 5 MODE STR CHIP6 COMMAND STR chiptool3 MODE STR CHIP 4 COMMAND STR chiptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ 7 5 RETENTION_TIME U16 30 8 6 END 9 7 CLEAN_MODES METADATA 10 MODE STR WARP11 COMMAND STR warptool8 MODE STR WARP 9 COMMAND STR warptool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ 12 10 RETENTION_TIME U16 7 13 11 END 14 12 CLEAN_MODES METADATA 15 MODE STR DIFF16 COMMAND STR difftool13 MODE STR DIFF 14 COMMAND STR difftool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ -data_group @DATA_GROUP@ 17 15 RETENTION_TIME S16 30 18 # RETENTION_TIME S16 -1 19 END 20 CLEAN_MODES METADATA 21 MODE STR DIST 22 COMMAND STR disttool 16 END 17 CLEAN_MODES METADATA 18 MODE STR DIST 19 COMMAND STR disttool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -full -set_label goto_cleaned -label @LABEL@ -time_stamp_end @CURRENT_DATE@ 23 20 RETENTION_TIME S16 10 24 ALTERNATE_CMD STR A 25 END 26 CLEAN_MODES METADATA 27 MODE STR MAGICDS 28 COMMAND STR magicdstool 21 END 22 CLEAN_MODES METADATA 23 MODE STR MAGICDS 24 COMMAND STR magicdstool -dbname @DBNAME@ -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label @LABEL@ 29 25 RETENTION_TIME S16 1 30 ALTERNATE_CMD STR B 26 END 27 28 END_OF_NIGHT MULTI 29 END_OF_NIGHT METADATA 30 NAME STR MORNING_DARKS 31 OBSMODE STR ENGINEERING 32 EXPTYPE STR DARK 33 OBJECT STR ENGINEERING 34 COMMENT STR darks_morn% 31 35 END 32 36 … … 43 47 44 48 MACRO_DEFINITIONS MULTI 45 #MACRO_DEFINITIONS METADATA46 # PROC_MODE STR check_chips47 # MACRO STR echo survey.del.destreak @LABEL@48 #END49 49 MACRO_DEFINITIONS METADATA 50 50 PROC_MODE STR queue_chips … … 55 55 MACRO STR survey.add.destreak @LABEL@ /data/ipp053.0/gpc1_destreak 56 56 END 57 #MACRO_DEFINITIONS METADATA 58 # PROC_MODE STR check_confirm_stacks 59 # MACRO STR echo survey.add.destreak @LABEL@ /data/ipp053.0/gpc1_destreak 60 #END 61 # MACRO_DEFINITIONS METADATA 62 # PROC_MODE STR clean_old 63 # MACRO STR 57 58 TARGETS MULTI 59 TARGETS METADATA 60 NAME STR M31 61 DISTRIBUTION STR M31 62 TESS STR M31 63 OBSMODE STR M31 64 OBJECT STR M31% 65 STACKABLE BOOL TRUE 66 MIN_STACK U16 8 67 DIFFABLE BOOL FALSE 68 DIST S16 30 69 END 70 TARGETS METADATA 71 NAME STR MD01 72 DISTRIBUTION STR MD01 73 TESS STR MD01.V2 74 OBSMODE STR MD 75 OBJECT STR MD01% 76 STACKABLE BOOL TRUE 77 MIN_STACK U16 8 78 DIFFABLE BOOL FALSE 79 DIST S16 30 80 END 81 TARGETS METADATA 82 NAME STR MD02 83 DISTRIBUTION STR MD02 84 TESS STR MD02 85 OBSMODE STR MD 86 OBJECT STR MD02% 87 STACKABLE BOOL TRUE 88 MIN_STACK U16 8 89 DIFFABLE BOOL FALSE 90 DIST S16 30 91 END 92 TARGETS METADATA 93 NAME STR MD03 94 DISTRIBUTION STR MD03 95 TESS STR MD03 96 OBSMODE STR MD 97 OBJECT STR MD03% 98 STACKABLE BOOL TRUE 99 MIN_STACK U16 8 100 DIFFABLE BOOL FALSE 101 DIST S16 30 102 END 103 TARGETS METADATA 104 NAME STR MD04 105 DISTRIBUTION STR MD04 106 TESS STR MD04 107 OBSMODE STR MD 108 OBJECT STR MD04% 109 STACKABLE BOOL TRUE 110 MIN_STACK U16 8 111 DIFFABLE BOOL FALSE 112 DIST S16 30 113 END 114 TARGETS METADATA 115 NAME STR MD05 116 DISTRIBUTION STR MD05 117 TESS STR MD05 118 OBSMODE STR MD 119 OBJECT STR MD05% 120 STACKABLE BOOL TRUE 121 MIN_STACK U16 8 122 DIFFABLE BOOL FALSE 123 DIST S16 30 124 END 125 TARGETS METADATA 126 NAME STR MD06 127 DISTRIBUTION STR MD06 128 TESS STR MD06 129 OBSMODE STR MD 130 OBJECT STR MD06% 131 STACKABLE BOOL TRUE 132 MIN_STACK U16 8 133 DIFFABLE BOOL FALSE 134 DIST S16 30 135 END 136 TARGETS METADATA 137 NAME STR MD07 138 DISTRIBUTION STR MD07 139 TESS STR MD07 140 OBSMODE STR MD 141 OBJECT STR MD07% 142 STACKABLE BOOL TRUE 143 MIN_STACK U16 8 144 DIFFABLE BOOL FALSE 145 DIST S16 30 146 END 147 TARGETS METADATA 148 NAME STR MD08 149 DISTRIBUTION STR MD08 150 TESS STR MD08.V2 151 OBSMODE STR MD 152 OBJECT STR MD08% 153 STACKABLE BOOL TRUE 154 MIN_STACK U16 8 155 DIFFABLE BOOL FALSE 156 DIST S16 30 157 END 158 TARGETS METADATA 159 NAME STR MD09 160 DISTRIBUTION STR MD09 161 TESS STR MD09.V2 162 OBSMODE STR MD 163 OBJECT STR MD09% 164 STACKABLE BOOL TRUE 165 MIN_STACK U16 8 166 DIFFABLE BOOL FALSE 167 DIST S16 30 168 END 169 TARGETS METADATA 170 NAME STR MD10 171 DISTRIBUTION STR MD10 172 TESS STR MD10.V2 173 OBSMODE STR MD 174 OBJECT STR MD10% 175 STACKABLE BOOL TRUE 176 MIN_STACK U16 8 177 DIFFABLE BOOL FALSE 178 DIST S16 30 179 END 180 TARGETS METADATA 181 NAME STR MD11 182 DISTRIBUTION STR MD11 183 TESS STR MD11.V2 184 OBSMODE STR MD 185 OBJECT STR MD11% 186 STACKABLE BOOL TRUE 187 MIN_STACK U16 8 188 DIFFABLE BOOL FALSE 189 DIST S16 30 190 END 191 TARGETS METADATA 192 NAME STR STS 193 DISTRIBUTION STR STS 194 TESS STR STS 195 OBSMODE STR STS% 196 OBJECT STR STS% 197 STACKABLE BOOL FALSE 198 DIFFABLE BOOL FALSE 199 END 200 TARGETS METADATA 201 NAME STR SweetSpot 202 DISTRIBUTION STR SweetSpot 203 TESS STR RINGS.V0 204 OBSMODE STR SS 205 STACKABLE BOOL FALSE 206 DIFFABLE BOOL TRUE 207 WARP S16 60 208 END 209 TARGETS METADATA 210 NAME STR OSS 211 DISTRIBUTION STR SweetSpot 212 TESS STR RINGS.V0 213 OBSMODE STR OSS 214 STACKABLE BOOL FALSE 215 DIFFABLE BOOL TRUE 216 END 217 TARGETS METADATA 218 NAME STR CNP 219 DISTRIBUTION STR CNP 220 TESS STR RINGS.V0 221 OBSMODE STR CNP 222 STACKABLE BOOL FALSE 223 DIFFABLE BOOL FALSE 224 END 225 TARGETS METADATA 226 NAME STR ThreePi 227 DISTRIBUTION STR ThreePi 228 TESS STR RINGS.V0 229 OBSMODE STR 3PI 230 STACKABLE BOOL FALSE 231 DIFFABLE BOOL TRUE 232 CHIP S16 14 233 DIFF S16 14 234 END 235 # This is a hack, and I freely admit it. 236 # Removed the rest because we do not regularly run microtests. 237 # TARGETS METADATA 238 # NAME STR microtestMD01 239 # TESS STR MD01 240 # OBJECT STR MD01% 241 # COMMENT STR Microtest Obs% 242 # STACKABLE BOOL TRUE 64 243 # END 65 # MACRO_DEFINITIONS METADATA 66 # PROC_MODE STR check_registration 67 # MACRO STR 244 # TARGETS METADATA 245 # NAME STR microtestMD01.noPattern 246 # TESS STR MD01 247 # OBJECT STR MD01% 248 # COMMENT STR Microtest Obs% 249 # REDUCTION STR MICROTEST_NOPATTERN 250 # STACKABLE BOOL TRUE 68 251 # END 69 # MACRO_DEFINITIONS METADATA70 # PROC_MODE STR define_burntool71 # MACRO STR72 # END73 # MACRO_DEFINITIONS METADATA74 # PROC_MODE STR queue_burntool75 # MACRO STR76 # END77 # MACRO_DEFINITIONS METADATA78 # PROC_MODE STR check_stacks79 # MACRO STR80 # END81 # MACRO_DEFINITIONS METADATA82 # PROC_MODE STR queue_stacks83 # MACRO STR84 # END85 # MACRO_DEFINITIONS METADATA86 # PROC_MODE STR check_sweetspot87 # MACRO STR88 # END89 # MACRO_DEFINITIONS METADATA90 # PROC_MODE STR queue_sweetspot91 # MACRO STR92 # END93 # MACRO_DEFINITIONS METADATA94 # PROC_MODE STR check_dqstats95 # MACRO STR96 # END97 # MACRO_DEFINITIONS METADATA98 # PROC_MODE STR queue_dqstats99 # MACRO STR100 # END101 # MACRO_DEFINITIONS METADATA102 # PROC_MODE STR check_detrends103 # MACRO STR104 # END105 # MACRO_DEFINITIONS METADATA106 # PROC_MODE STR queue_detrends107 # MACRO STR108 # END109 110 TARGETS MULTI111 TARGETS METADATA112 NAME STR M31113 TESS STR M31114 OBSMODE STR M31115 OBJECT STR M31%116 # COMMENT STR M31%117 STACKABLE BOOL TRUE118 DIST S16 30119 END120 TARGETS METADATA121 NAME STR MD01122 TESS STR MD01.V2123 OBSMODE STR MD124 OBJECT STR MD01%125 # COMMENT STR %MD01%126 STACKABLE BOOL TRUE127 DIST S16 30128 END129 TARGETS METADATA130 NAME STR MD02131 TESS STR MD02.V2132 OBSMODE STR MD133 OBJECT STR MD02%134 # COMMENT STR %MD02%135 STACKABLE BOOL TRUE136 DIST S16 30137 END138 TARGETS METADATA139 NAME STR MD03140 TESS STR MD03141 OBSMODE STR MD142 OBJECT STR MD03%143 # COMMENT STR %MD03%144 STACKABLE BOOL TRUE145 DIST S16 30146 END147 TARGETS METADATA148 NAME STR MD04149 TESS STR MD04150 OBSMODE STR MD151 OBJECT STR MD04%152 # COMMENT STR %MD04%153 STACKABLE BOOL TRUE154 DIST S16 30155 END156 TARGETS METADATA157 NAME STR MD05158 TESS STR MD05159 OBSMODE STR MD160 OBJECT STR MD05%161 # COMMENT STR %MD05%162 STACKABLE BOOL TRUE163 DIST S16 30164 END165 TARGETS METADATA166 NAME STR MD06167 TESS STR MD06168 OBSMODE STR MD169 OBJECT STR MD06%170 # COMMENT STR %MD06%171 STACKABLE BOOL TRUE172 DIST S16 30173 END174 TARGETS METADATA175 NAME STR MD07176 TESS STR MD07177 OBSMODE STR MD178 OBJECT STR MD07%179 # COMMENT STR %MD07%180 STACKABLE BOOL TRUE181 DIST S16 30182 END183 TARGETS METADATA184 NAME STR MD08185 TESS STR MD08.V2186 OBSMODE STR MD187 OBJECT STR MD08%188 # COMMENT STR %MD08%189 STACKABLE BOOL TRUE190 DIST S16 30191 END192 TARGETS METADATA193 NAME STR MD09194 TESS STR MD09.V2195 OBSMODE STR MD196 OBJECT STR MD09%197 # COMMENT STR %MD09%198 STACKABLE BOOL TRUE199 DIST S16 30200 END201 TARGETS METADATA202 NAME STR MD10203 TESS STR MD10.V2204 OBSMODE STR MD205 OBJECT STR MD10%206 # COMMENT STR %MD10%207 STACKABLE BOOL TRUE208 DIST S16 30209 END210 TARGETS METADATA211 NAME STR MD11212 TESS STR MD11.V2213 OBSMODE STR MD214 OBJECT STR MD11%215 # COMMENT STR %MD11%216 STACKABLE BOOL TRUE217 DIST S16 30218 END219 TARGETS METADATA220 NAME STR STS221 TESS STR STS222 OBSMODE STR STS%223 OBJECT STR STS%224 # COMMENT STR Stellar Transit%225 STACKABLE BOOL FALSE226 END227 TARGETS METADATA228 NAME STR SweetSpot229 TESS STR RINGS.V0230 OBSMODE STR SS231 # OBJECT STR SS232 STACKABLE BOOL FALSE233 EXTRA_PROCESSING BOOL TRUE234 # NOCLEAN BOOL TRUE235 WARP S16 60236 END237 TARGETS METADATA238 NAME STR OSS239 DISTRIBUTION STR SweetSpot240 TESS STR RINGS.V0241 OBSMODE STR OSS242 STACKABLE BOOL FALSE243 EXTRA_PROCESSING BOOL TRUE244 END245 TARGETS METADATA246 NAME STR CNP247 DISTRIBUTION STR CNP248 TESS STR RINGS.V0249 OBSMODE STR CNP250 STACKABLE BOOL FALSE251 EXTRA_PROCESSING BOOL FALSE252 END253 TARGETS METADATA254 NAME STR ThreePi255 TESS STR RINGS.V0256 OBSMODE STR 3PI257 # OBJECT STR 3PI258 STACKABLE BOOL FALSE259 CHIP S16 14260 DIFF S16 14261 END262 # This is a hack, and I freely admit it.263 TARGETS METADATA264 NAME STR microtestMD01265 TESS STR MD01266 OBJECT STR MD01%267 COMMENT STR Microtest Obs%268 STACKABLE BOOL TRUE269 END270 TARGETS METADATA271 NAME STR microtestMD01.noPattern272 TESS STR MD01273 OBJECT STR MD01%274 COMMENT STR Microtest Obs%275 REDUCTION STR MICROTEST_NOPATTERN276 STACKABLE BOOL TRUE277 END278 TARGETS METADATA279 NAME STR microtestMD02280 TESS STR MD02281 OBJECT STR MD02%282 COMMENT STR Microtest Obs%283 STACKABLE BOOL TRUE284 END285 TARGETS METADATA286 NAME STR microtestMD02.noPattern287 TESS STR MD02288 OBJECT STR MD02%289 COMMENT STR Microtest Obs%290 REDUCTION STR MICROTEST_NOPATTERN291 STACKABLE BOOL TRUE292 END293 TARGETS METADATA294 NAME STR microtestMD03295 TESS STR MD03296 OBJECT STR MD03%297 COMMENT STR Microtest Obs%298 STACKABLE BOOL TRUE299 END300 TARGETS METADATA301 NAME STR microtestMD03.noPattern302 TESS STR MD03303 OBJECT STR MD03%304 COMMENT STR Microtest Obs%305 REDUCTION STR MICROTEST_NOPATTERN306 STACKABLE BOOL TRUE307 END308 TARGETS METADATA309 NAME STR microtestMD04310 TESS STR MD04311 OBJECT STR MD04%312 COMMENT STR Microtest Obs%313 STACKABLE BOOL TRUE314 END315 TARGETS METADATA316 NAME STR microtestMD04.noPattern317 TESS STR MD04318 OBJECT STR MD04%319 COMMENT STR Microtest Obs%320 REDUCTION STR MICROTEST_NOPATTERN321 STACKABLE BOOL TRUE322 END323 TARGETS METADATA324 NAME STR microtestMD05325 TESS STR MD05326 OBJECT STR MD05%327 COMMENT STR Microtest Obs%328 STACKABLE BOOL TRUE329 END330 TARGETS METADATA331 NAME STR microtestMD05.noPattern332 TESS STR MD05333 OBJECT STR MD05%334 COMMENT STR Microtest Obs%335 REDUCTION STR MICROTEST_NOPATTERN336 STACKABLE BOOL TRUE337 END338 TARGETS METADATA339 NAME STR microtestMD06340 TESS STR MD06341 OBJECT STR MD06%342 COMMENT STR Microtest Obs%343 STACKABLE BOOL TRUE344 END345 TARGETS METADATA346 NAME STR microtestMD06.noPattern347 TESS STR MD06348 OBJECT STR MD06%349 COMMENT STR Microtest Obs%350 REDUCTION STR MICROTEST_NOPATTERN351 STACKABLE BOOL TRUE352 END353 TARGETS METADATA354 NAME STR microtestMD07355 TESS STR MD07356 OBJECT STR MD07%357 COMMENT STR Microtest Obs%358 STACKABLE BOOL TRUE359 END360 TARGETS METADATA361 NAME STR microtestMD07.noPattern362 TESS STR MD07363 OBJECT STR MD07%364 COMMENT STR Microtest Obs%365 REDUCTION STR MICROTEST_NOPATTERN366 STACKABLE BOOL TRUE367 END368 TARGETS METADATA369 NAME STR microtestMD08370 TESS STR MD08371 OBJECT STR MD08%372 COMMENT STR Microtest Obs%373 STACKABLE BOOL TRUE374 END375 TARGETS METADATA376 NAME STR microtestMD08.noPattern377 TESS STR MD08378 OBJECT STR MD08%379 COMMENT STR Microtest Obs%380 REDUCTION STR MICROTEST_NOPATTERN381 STACKABLE BOOL TRUE382 END383 TARGETS METADATA384 NAME STR microtestMD09385 TESS STR MD09386 OBJECT STR MD09%387 COMMENT STR Microtest Obs%388 STACKABLE BOOL TRUE389 END390 TARGETS METADATA391 NAME STR microtestMD09.noPattern392 TESS STR MD09393 OBJECT STR MD09%394 COMMENT STR Microtest Obs%395 REDUCTION STR MICROTEST_NOPATTERN396 STACKABLE BOOL TRUE397 END398 TARGETS METADATA399 NAME STR microtestMD10400 TESS STR MD10401 OBJECT STR MD10%402 COMMENT STR Microtest Obs%403 STACKABLE BOOL TRUE404 END405 TARGETS METADATA406 NAME STR microtestMD10.noPattern407 TESS STR MD10408 OBJECT STR MD10%409 COMMENT STR Microtest Obs%410 REDUCTION STR MICROTEST_NOPATTERN411 STACKABLE BOOL TRUE412 END413 252 414 253 # Detrend verification data … … 420 259 REF_ID S64 299 421 260 REF_ITER S32 0 422 # FILTER STR 423 MAX S32 10 261 MAX_EXP S32 10 424 262 END 425 263 … … 431 269 REF_ITER S32 0 432 270 FILTER STR g.00000 433 MAX S32 10271 MAX_EXP S32 10 434 272 END 435 273 … … 441 279 REF_ITER S32 0 442 280 FILTER STR r.00000 443 MAX S32 10281 MAX_EXP S32 10 444 282 END 445 283 … … 451 289 REF_ITER S32 0 452 290 FILTER STR i.00000 453 MAX S32 10291 MAX_EXP S32 10 454 292 END 455 293 … … 461 299 REF_ITER S32 0 462 300 FILTER STR z.00000 463 MAX S32 10301 MAX_EXP S32 10 464 302 END 465 303 … … 471 309 REF_ITER S32 0 472 310 FILTER STR y.00000 473 MAX S32 10311 MAX_EXP S32 10 474 312 END 475 313 … … 481 319 REF_ITER S32 0 482 320 FILTER STR w.00000 483 MAX S32 10484 END 485 321 MAX_EXP S32 10 322 END 323 -
trunk/ippconfig/recipes/ppStats.config
r29902 r30049 236 236 CONCEPT STR FPA.BURNTOOL.APPLIED 237 237 238 238 239 CONCEPT STR FPA.PON.TIME # time since last power on 240 241 CONCEPT STR CHIP.VIDEOCELL 239 242 240 243 STAT STR ROBUST_MEDIAN # Background estimator -
trunk/ippconfig/recipes/ppStatsFromMetadata.config
r29902 r30049 45 45 ENTRY VAL FPA.PON.TIME F32 CONSTANT -pon_time # time since last power on 46 46 # ENTRY VAL FPA.BURNTOOL.APPLIED S32 CONSTANT -burntool_state # 47 ENTRY VAL CHIP.VIDEOCELL BOOL CONSTANT -video_cells # This chip contains a video cell 47 48 ENTRY VAL CHIP.TEMP F32 SAMPLE_MEAN -ccd_temp # CCD temperature 48 49 ENTRY VAL CELL.EXPOSURE F32 SAMPLE_MEAN -exp_time # Exposure time -
trunk/psLib/src/imageops
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/psModules/src/concepts/pmConcepts.c
r28552 r30049 249 249 CONCEPT_REGISTER_FUNCTION(S32, Enum, -1); // For enums: set default to -1 250 250 CONCEPT_REGISTER_FUNCTION(S32, S32, 0); // For values: set default to 0 251 //CONCEPT_REGISTER_FUNCTION(Bool, Bool, NULL); // For values: set default to 0251 CONCEPT_REGISTER_FUNCTION(Bool, Bool, NULL); // For values: set default to 0 252 252 253 253 static void conceptRegisterTime(const char *name, /* Name of concept */ \ … … 353 353 conceptRegisterStr("CHIP.ID", "Chip identifier", NULL, NULL, NULL, false, PM_FPA_LEVEL_CHIP); 354 354 conceptRegisterF32("CHIP.SEEING", "Seeing FWHM (pixels)", NULL, NULL, NULL, false, PM_FPA_LEVEL_CHIP); 355 conceptRegisterBool("CHIP.VIDEOCELL", "Does this OTA have any video cells", p_pmConceptParse_VideoCell,NULL,NULL,false,PM_FPA_LEVEL_CHIP); 355 356 } 356 357 -
trunk/psModules/src/concepts/pmConceptsStandard.c
r28690 r30049 737 737 return psMetadataItemAllocS32(pattern->name, pattern->comment, binning); 738 738 } 739 740 // VIDEOCELLS 741 psMetadataItem *p_pmConceptParse_VideoCell(const psMetadataItem *concept, 742 const psMetadataItem *pattern, 743 pmConceptSource source, 744 const psMetadata *cameraFormat, 745 const pmFPA *fpa, 746 const pmChip *chip, 747 const pmCell *cell) 748 { 749 assert(concept); 750 assert(pattern); 751 bool has_video_cell = false; 752 753 if (concept->type != PS_DATA_STRING) { 754 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Type for %s (%x) is not string\n", 755 concept->name, concept->type); 756 return NULL; 757 } 758 759 char *Vptr = strchr(concept->data.V,'V'); 760 if (Vptr) { 761 has_video_cell = true; 762 } 763 764 return psMetadataItemAllocBool(pattern->name, pattern->comment, has_video_cell); 765 } 766 767 739 768 740 769 // BTOOLAPP -
trunk/psModules/src/concepts/pmConceptsStandard.h
r25930 r30049 136 136 ); 137 137 138 // Parse the CHIP.VIDEOCELL concept 139 psMetadataItem *p_pmConceptParse_VideoCell( 140 const psMetadataItem *concept, ///< Concept to parse 141 const psMetadataItem *pattern, ///< Pattern to use in parsing 142 pmConceptSource source, ///< Source for concept 143 const psMetadata *cameraFormat, ///< Camera format definition 144 const pmFPA *fpa, ///< FPA for concept, or NULL 145 const pmChip *chip, ///< Chip for concept, or NULL 146 const pmCell *cell ///< Cell for concept, or NULL 147 ); 148 138 149 /// Format for the BTOOLAPP conceptn 139 150 psMetadataItem *p_pmConceptParse_BTOOLAPP( -
trunk/psModules/src/objects
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/psphot
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/psphot/src/psphotApResid.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/psphot/src/psphotMakeFluxScale.c
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
