Changeset 28981
- Timestamp:
- Aug 19, 2010, 6:52:05 PM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621
- Files:
-
- 12 edited
-
ippScripts/scripts/automate_stacks.pl (modified) (23 diffs)
-
ippScripts/scripts/chip_imfile.pl (modified) (3 diffs)
-
ippScripts/scripts/dist_advancerun.pl (modified) (2 diffs)
-
ippScripts/scripts/dist_bundle.pl (modified) (6 diffs)
-
ippScripts/scripts/dist_make_fileset.pl (modified) (1 diff)
-
ippScripts/scripts/magic_destreak.pl (modified) (1 diff)
-
ippScripts/scripts/receive_advance.pl (modified) (1 diff)
-
ippScripts/scripts/receive_file.pl (modified) (2 diffs)
-
ippScripts/scripts/staticsky.pl (modified) (2 diffs)
-
ippTasks (modified) (1 prop)
-
ippTasks/nightly_stacks.pro (modified) (5 diffs)
-
ippTasks/survey.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/ippScripts/scripts/automate_stacks.pl
r28794 r28981 25 25 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 26 26 my $mkBTpcontrol = can_run('make_burntool_pcontrol.pl') or (warn "Can't find make_burntool_pcontrol.pl" and $missing_tools = 1); 27 my $moondata = can_run('moondata') or (warn "Can't find moondata" and $missing_tools = 1); 27 28 28 29 if ($missing_tools) { … … 41 42 # Grab options 42 43 my ( $date, $camera, $dbname, $logfile, $verbose, $manual); 43 my ( $help, $isburning, $force_stack_count, $test_mode, $this_target_only, $this_filter_only, $this_mode_only, $check_mode );44 my ( $help, $isburning, $force_stack_count, $test_mode, $this_target_only, $this_filter_only, $this_mode_only, $check_mode, $burntool_stats); 44 45 my ( $check_registration, $define_burntool, $queue_burntool, $check_chips, $queue_chips); 45 my ( $check_stacks, $queue_stacks, $check_ diffs, $queue_diffs, $clean_old);46 my ( $check_stacks, $queue_stacks, $check_sweetspot, $queue_sweetspot, $check_diffs, $queue_diffs, $clean_old); 46 47 my ( $check_detrends, $queue_detrends, $check_dqstats, $queue_dqstats); 47 48 … … 58 59 'check' => \$check_mode, 59 60 'test_mode' => \$test_mode, 61 'burntool_stats' => \$burntool_stats, 60 62 'this_target_only=s' => \$this_target_only, 61 63 'this_filter_only=s' => \$this_filter_only, … … 68 70 'check_stacks' => \$check_stacks, 69 71 'queue_stacks' => \$queue_stacks, 72 'check_sweetspot' => \$check_sweetspot, 73 'queue_sweetspot' => \$queue_sweetspot, 70 74 'check_detrends' => \$check_detrends, 71 75 'queue_detrends' => \$queue_detrends, … … 89 93 --this_filter_only Process only a single filter. 90 94 --this_mode_only Process only a single clean mode. 95 --burntool_stats Display Nexp Nimfile Nburntooled Nqueued for check_chips. 91 96 Modes: 92 97 --check_registration Confirm the data downloaded correctly. … … 97 102 --check_stacks Confirm that stacks can be built. 98 103 --queue_stacks Issue stacktool commands to queue stacks. 104 --check_sweetspot See if we should queue SweetSpot stacks. 105 --queue_sweetspot Issue stacktool commands to queue SweetSpot stacks. 99 106 --check_detrends Confirm that detrend verify runs can be built. 100 107 --queue_detrends Issue dettool commands to queue detrend verify runs. … … 111 118 ) unless 112 119 defined $check_registration or defined $define_burntool or defined $queue_burntool or 113 defined $queue_chips or defined $queue_stacks or $queue_ detrends or $queue_dqstats or114 defined $check_chips or defined $check_stacks or $check_ detrends or $check_dqstats or120 defined $queue_chips or defined $queue_stacks or $queue_sweetspot or $queue_detrends or $queue_dqstats or 121 defined $check_chips or defined $check_stacks or $check_sweetspot or $check_detrends or $check_dqstats or 115 122 defined $test_mode or defined $clean_old or defined $check_mode; 116 123 … … 125 132 my %stackable_list = (); 126 133 my %reduction_class = (); 134 my @unrecoverable_quality = (); 127 135 my @detrend_list = (); 128 136 my %dettype_list = (); … … 170 178 elsif (${ $entry }{name} eq 'FILTERS') { 171 179 push @filter_list, ${ $entry }{value}; 180 } 181 elsif (${ $entry }{name} eq 'UNRECOVERABLE_QUALITY') { 182 push @unrecoverable_quality, ${ $entry }{value}; 172 183 } 173 184 elsif (${ $entry }{name} eq 'TARGETS') { … … 304 315 unless (defined($test_mode) || defined($check_mode)) { exit(0); } 305 316 } 317 306 318 if (defined($check_dqstats) || defined($test_mode)) { 307 319 $metadata_out{nsState} = 'CHECKDQSTATS'; … … 316 328 unless (defined($test_mode)) { exit(0); } 317 329 } 330 318 331 if (defined($check_detrends) || defined($test_mode) || defined($check_mode)) { 319 332 $metadata_out{nsState} = 'CHECKDETRENDS'; … … 328 341 exit(0); 329 342 } 343 330 344 if (defined($define_burntool) || defined($test_mode)) { 331 345 $metadata_out{nsState} = 'QUEUEBURNING'; … … 339 353 unless (defined($test_mode)) { exit(0); } 340 354 } 355 341 356 if (defined($check_chips) || defined($test_mode) || defined($check_mode)) { 342 357 $metadata_out{nsState} = 'QUEUECHIPS'; … … 354 369 exit(0); 355 370 } 371 356 372 if (defined($check_stacks) || defined($test_mode) || defined($check_mode)) { 357 373 $metadata_out{nsState} = 'TOWARP'; … … 372 388 exit(0); 373 389 } 390 391 if (defined($check_sweetspot) || defined($test_mode) || defined($check_mode)) { 392 $metadata_out{nsState} = 'CHECKSWEETSPOT'; 393 &execute_sweetspot($date,"pretend"); 394 return_metadata($date); 395 unless (defined($test_mode) || defined($check_mode)) { exit(0); } 396 } 397 if (defined($queue_sweetspot)) { 398 $metadata_out{nsState} = 'CHECKSWEETSPOT'; 399 &execute_sweetspot($date); 400 return_metadata($date); 401 exit(0); 402 } 403 374 404 if (defined($check_diffs) || defined($queue_diffs)) { 375 405 die("Diffs are currently not implemented."); 376 406 } 407 377 408 if (defined($clean_old) || defined($test_mode)) { 378 409 if (defined($test_mode)) { … … 656 687 my $pretend = shift; 657 688 my $exposures = 0; 689 658 690 foreach my $target (@target_list) { 659 691 my ($Nexposures,$Nimfiles,$Nburntooled,$Nalready) = pre_chip_queue($date,$target); 692 if (defined($burntool_stats)) { 693 print "$Nexposures $Nimfiles $Nburntooled $Nalready\n"; 694 } 695 660 696 if ($Nexposures == 0) { 661 697 print STDERR "execute_chips: Target $target on $date had no exposures.\n"; … … 861 897 862 898 # 899 # SweetSpot Stacking 900 ################################################################################ 901 sub construct_sweetspot_cmd { 902 my $date = shift; 903 my $target = 'SweetSpot'; 904 my $filter = 'w.00000'; 905 906 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 907 908 # Dateobs begin end? 909 my ($dateobs_begin,$dateobs_end) = get_lunation_extent($date); 910 my $select = "-select_dateobs_begin ${dateobs_begin}T00:00:00 -select_dateobs_end ${dateobs_end}T00:00:00"; 911 my $cmd = "$stacktool"; 912 $cmd .= " -simple -dbname $dbname -definebyquery "; 913 $cmd .= " -set_label SweetSpot.refstack -select_label $label "; 914 $cmd .= " -set_workdir $workdir -set_dist_group $dist_group "; 915 $cmd .= " -select_filter $filter -set_data_group $data_group "; 916 $cmd .= " -select_good_frac_min 0.1 -select_fwhm_major_max 8.0 "; 917 $cmd .= " -min_num 7 -min_new 4"; 918 $cmd .= " $select "; 919 if ($debug == 1) { 920 $cmd .= ' -pretend '; 921 } 922 print STDERR "$cmd\n"; 923 return($cmd); 924 } 925 926 sub get_lunation_extent { 927 my $date = shift; 928 my ($year,$month,$day) = split /-/,$date; 929 my $dateobs_begin; 930 my $dateobs_end; 931 932 my $dt = DateTime->new(year => $year, month => $month, day => $day, 933 hour => 0, minute => 0, second => 0, nanosecond => 0, 934 time_zone => 'Pacific/Honolulu'); 935 do { 936 $dt->subtract(days => 1); 937 my $ymd = $dt->ymd; 938 my $md_cmd = "moondata $ymd 0 0"; 939 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 940 run ( command => $md_cmd, verbose => $verbose); 941 unless ($success) { 942 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 943 &my_die("Unable to perform moondata: $error_code", 0,0, $date, $PS_EXIT_SYS_ERROR); 944 } 945 my @result = split /\s+/,(join "\n", @$stdout_buf); 946 if (abs($result[6]) <= 0.5) { 947 $dateobs_end = $ymd; 948 } 949 } while (!defined($dateobs_end)); 950 951 do { 952 $dt->subtract(days => 1); 953 my $ymd = $dt->ymd; 954 my $md_cmd = "moondata $ymd 0 0"; 955 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 956 run ( command => $md_cmd, verbose => $verbose); 957 unless ($success) { 958 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 959 &my_die("Unable to perform moondata: $error_code", 0,0, $date, $PS_EXIT_SYS_ERROR); 960 } 961 my @result = split /\s+/,(join "", @$stdout_buf); 962 if (abs($result[6]) <= 0.5) { 963 $dateobs_begin = $ymd; 964 } 965 } while (!defined($dateobs_begin)); 966 967 return($dateobs_begin,$dateobs_end); 968 } 969 970 sub pre_sweetspot_queue { 971 my $date = shift; 972 my $command = construct_sweetspot_cmd($date) . ' -pretend '; 973 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 974 run ( command => $command, verbose => $verbose ); 975 unless ($success) { 976 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 977 &my_die("Unable to perform sweetspot stacktool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 978 } 979 my @stacks = split /\n/, (join '', @$stdout_buf); 980 my $Nstacks = $#stacks + 1; 981 982 return(1,$Nstacks); 983 } 984 985 sub sweetspot_queue { 986 my $date = shift; 987 my $command = construct_sweetspot_cmd($date); 988 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 989 run ( command => $command, verbose => $verbose ); 990 unless ($success) { 991 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 992 &my_die("Unable to perform sweetspot stacktool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 993 } 994 my @stacks = split /\n/, (join '', @$stdout_buf); 995 my $Nstacks = $#stacks + 1; 996 997 return(1,$Nstacks); 998 } 999 1000 sub execute_sweetspot { 1001 my $date = shift; 1002 my $pretend = shift; 1003 1004 my ($is_lunation_date,$Nstacks) = pre_sweetspot_queue($date); 1005 if ($Nstacks == 0) { 1006 print STDERR "execute_sweetspot: No new stacks to make ($Nstacks)\n"; 1007 $metadata_out{nsState} = 'SS_EMPTY'; 1008 return(); 1009 } 1010 if ($Nstacks < 10) { 1011 print STDERR "execute_sweetspot: Too few new stacks to make ($Nstacks)\n"; 1012 $metadata_out{nsState} = 'SS_FEW'; 1013 return(); 1014 } 1015 if ($is_lunation_date == 0) { 1016 print STDERR "execute_sweetspot: Invalid lunation date. ($date $is_lunation_date)\n"; 1017 $metadata_out{nsState} = 'SS_ERROR'; 1018 return(); 1019 } 1020 $metadata_out{nsState} = 'SS_QUEUE'; 1021 $metadata_out{nsSweetSpot} = $Nstacks; 1022 unless(defined($pretend)) { 1023 $metadata_out{nsState} = 'SS_DONE'; 1024 sweetspot_queue($date); 1025 } 1026 } 1027 1028 # 863 1029 # Stacking 864 1030 ################################################################################ … … 900 1066 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 901 1067 902 my $sth = "SELECT skycell_id from stackRun where data_group = '$data_group' AND skycell_id = '$skycell' AND filter = '$filter' ";1068 my $sth = "SELECT skycell_id from stackRun where data_group = '$data_group' AND skycell_id = '$skycell' AND filter = '$filter' AND tess_id = '$tess_id'"; 903 1069 my $data_ref = $db->selectall_arrayref( $sth ); 904 1070 … … 918 1084 919 1085 my $where = " label = '$label' AND data_group = '$data_group' "; 1086 1087 my $where_possibly_faulted = $where . " AND ( " ; 1088 foreach my $acceptable_quality (@unrecoverable_quality) { 1089 $where_possibly_faulted .= " quality = $acceptable_quality OR "; 1090 } 1091 $where_possibly_faulted .= " 0 )"; 1092 920 1093 my $chip_sth = "SELECT * from chipRun WHERE (state = 'full' OR state = 'new') AND $where "; 1094 my $cam_sth = "SELECT * from camRun JOIN camProcessedExp USING(cam_id) WHERE state = 'full' AND $where_possibly_faulted "; 921 1095 my $warp_sth = "SELECT * from warpRun WHERE state = 'full' AND $where "; 922 1096 923 1097 my $chip_ref = $db->selectall_arrayref( $chip_sth ); 1098 my $cam_ref = $db->selectall_arrayref( $cam_sth ); 924 1099 my $warp_ref = $db->selectall_arrayref( $warp_sth ); 925 1100 … … 942 1117 } 943 1118 944 return($#input_exposures + 1, $#{ $chip_ref } + 1, $#{ $ warp_ref } + 1, $Nalready);1119 return($#input_exposures + 1, $#{ $chip_ref } + 1, $#{ $cam_ref } + $#{ $warp_ref } + 2, $Nalready); 945 1120 } 946 1121 … … 1039 1214 my $args = $command; 1040 1215 if ((exists($clean_alternate{$mode})) && ($clean_alternate{$mode} eq 'A')) { 1041 $args .= " -dbname $dbname -updaterun -set_state goto_cleaned -full -set_label goto_cleaned - time_stamp_end $cleaning_date ";1216 $args .= " -dbname $dbname -updaterun -set_state goto_cleaned -full -set_label goto_cleaned -label $label -time_stamp_end $cleaning_date "; 1042 1217 } 1043 1218 elsif ((exists($clean_alternate{$mode})) && ($clean_alternate{$mode} eq 'B')) { … … 1058 1233 1059 1234 foreach my $mode (@mode_list) { 1060 if ((exists($clean_alternate{$mode})) && ($clean_alternate{$mode} eq 'A')) {1061 my ($cleaning_date,$command) = construct_cleantool_args($date,"",$mode);1062 if ($cleaning_date eq 'no clean') {1063 next;1064 }1065 print STDERR "$command\n";1066 if (!(defined($pretend) || $debug == 1)) {1067 # print STDERR "BEAR IS DRIVING!?\n";1068 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =1069 run ( command => $command, verbose => $verbose );1070 unless ($success) {1071 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);1072 &my_die("Unable to perform cleantool ($command): $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR);1073 }1074 }1075 }1076 else {1235 # if ((exists($clean_alternate{$mode})) && ($clean_alternate{$mode} eq 'A')) { 1236 # my ($cleaning_date,$command) = construct_cleantool_args($date,"",$mode); 1237 # if ($cleaning_date eq 'no clean') { 1238 # next; 1239 # } 1240 # print STDERR "$command\n"; 1241 # if (!(defined($pretend) || $debug == 1)) { 1242 # # print STDERR "BEAR IS DRIVING!?\n"; 1243 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1244 # run ( command => $command, verbose => $verbose ); 1245 # unless ($success) { 1246 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1247 # &my_die("Unable to perform cleantool ($command): $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 1248 # } 1249 # } 1250 # } 1251 # else { 1077 1252 foreach my $target (@target_list) { 1078 1253 if (exists($noclean_list{$target})) { … … 1094 1269 } 1095 1270 } 1096 }1271 # } 1097 1272 } 1098 1273 return(0); -
branches/eam_branches/ipp-20100621/ippScripts/scripts/chip_imfile.pl
r28014 r28981 23 23 use PS::IPP::Config 1.01 qw( :standard ); 24 24 use File::Temp qw( tempfile ); 25 use File::Basename; 25 26 26 27 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 125 126 $outputStats .= '.update'; 126 127 $traceDest .= '.update'; 128 # make sure that any lingering destreak backup files are gone 129 $ipprc->delete_destreak_backup_file($outputImage) 130 or &my_die("failed to delete existing destreak backup image file", $exp_id, $chip_id, $class_id, $PS_EXIT_UNKNOWN_ERROR); 131 $ipprc->delete_destreak_backup_file($outputMask) 132 or &my_die("failed to delete existing destreak backup mask file", $exp_id, $chip_id, $class_id, $PS_EXIT_UNKNOWN_ERROR); 133 $ipprc->delete_destreak_backup_file($outputWeight) 134 or &my_die("failed to delete existing destreak backup weight file", $exp_id, $chip_id, $class_id, $PS_EXIT_UNKNOWN_ERROR); 127 135 } 128 136 … … 454 462 } 455 463 464 456 465 sub my_die 457 466 { -
branches/eam_branches/ipp-20100621/ippScripts/scripts/dist_advancerun.pl
r28794 r28981 67 67 my $stacktool = can_run('stacktool') or (warn "Can't find stacktool" and $missing_tools = 1); 68 68 my $bgtool = can_run('bgtool') or (warn "Can't find bgtool" and $missing_tools = 1); 69 my $staticskytool = can_run('staticskytool') or (warn "Can't find staticskytool" and $missing_tools = 1); 69 70 if ($missing_tools) { 70 71 &my_die("Can't find required tools.", $dist_id, $PS_EXIT_CONFIG_ERROR); … … 108 109 $list_mode = "-sumskyfile"; 109 110 $component_key = "skycell_id"; 111 } elsif ($stage eq "sky") { 112 $tool_cmd = "$staticskytool -sky_id"; 113 $list_mode = "-result"; 114 $component_key = ""; 110 115 } elsif ($stage eq "diff") { 111 116 $tool_cmd = "$difftool -diff_id"; -
branches/eam_branches/ipp-20100621/ippScripts/scripts/dist_bundle.pl
r28794 r28981 53 53 'PPSTACK.OUTPUT.MASK' => 'mask', 54 54 'PPSTACK.OUTPUT.VARIANCE' => 'variance' ); 55 my %sky_cleaned = ( 'PSPHOT.STACK.OUTPUT.IMAGE' => 'image', 56 'PSPHOT.STACK.OUTPUT.MASK' => 'mask', 57 'PSPHOT.STACK.OUTPUT.VARIANCE' => 'variance' ); 55 58 56 59 … … 58 61 my $missing_tools; 59 62 my $streaksrelease = can_run('streaksrelease') or (warn "Can't find streaksrelease" and $missing_tools = 1); 63 my $bgtool = can_run('bgtool') or (warn "Can't find bgtool" and $missing_tools = 1); 60 64 if ($missing_tools) { 61 65 warn("Can't find required tools."); … … 224 228 } 225 229 230 if (!$clean) { 231 if ($stage eq 'chip_bg') { 232 # add the variance file from the original chipRun 233 my $command = "$bgtool -listchip -chip_bg_id $stage_id -class_id $component"; 234 $command .= " -dbname $dbname" if $dbname; 235 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 236 run(command => $command, verbose => $verbose); 237 unless ($success) { 238 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 239 &my_die("Unable to perform $command: $error_code", $component, $error_code); 240 } 241 my $mdcParser = PS::IPP::Metadata::Config->new; 242 my $list = $mdcParser->parse( join "", @$stdout_buf) or 243 &my_die("Unable to parse bgtool metadata", $component, $PS_EXIT_SYS_ERROR); 244 my $parsed = parse_md_list($list); 245 246 # result is an array with one element 247 my $chip_data = $parsed->[0]; 248 249 my $chip_path_base = $chip_data->{path_base}; 250 $variance = $ipprc->filename('PPIMAGE.CHIP.VARIANCE', $chip_path_base, $component) or 251 &my_die("Unable to resolve variance file name from $chip_path_base", $component, $PS_EXIT_SYS_ERROR); 252 253 } elsif ($stage eq 'warp_bg') { 254 # add the variance file from the original warpRun 255 my $command = "$bgtool -listwarp -warp_bg_id $stage_id -skycell_id $component"; 256 $command .= " -dbname $dbname" if $dbname; 257 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 258 run(command => $command, verbose => $verbose); 259 unless ($success) { 260 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 261 &my_die("Unable to perform $command: $error_code", $component, $error_code); 262 } 263 my $mdcParser = PS::IPP::Metadata::Config->new; 264 my $list = $mdcParser->parse( join "", @$stdout_buf) or 265 &my_die("Unable to parse bgtool metadata", $component, $PS_EXIT_SYS_ERROR); 266 my $parsed = parse_md_list($list); 267 my $warp_data = $parsed->[0]; 268 my $warp_path_base = $warp_data->{path_base}; 269 $variance = $ipprc->filename('PSWARP.OUTPUT.VARIANCE', $warp_path_base) or 270 &my_die("Unable to resolve variance file name from $warp_path_base", $component, $PS_EXIT_SYS_ERROR); 271 } 272 } 273 226 274 if ($nan_masked_pixels) { 227 275 # One last check as to whether magic has been applied to the inputs … … 239 287 if (($stage ne "chip_bg") and ($stage ne "warp_bg")) { 240 288 &my_die("no variance image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$variance; 289 } else { 290 &my_die("variance is not defined", $component, $PS_EXIT_CONFIG_ERROR) if !$variance; 241 291 } 242 292 } … … 373 423 } elsif ($stage eq "stack") { 374 424 $type = $stack_cleaned{$rule}; 425 } elsif ($stage eq "sky") { 426 $type = $sky_cleaned{$rule}; 375 427 } else { 376 428 &my_die("$stage is not a valid stage", $component, $PS_EXIT_CONFIG_ERROR); … … 453 505 } elsif ($stage eq "stack") { 454 506 $config_file_rule = "PPSTACK.CONFIG"; 507 } elsif ($stage eq "sky") { 508 $config_file_rule = "PSPHOT.STACK.CONFIG"; 455 509 } else { 456 510 &my_die("$stage is not a valid stage", $component, $PS_EXIT_CONFIG_ERROR); -
branches/eam_branches/ipp-20100621/ippScripts/scripts/dist_make_fileset.pl
r28794 r28981 223 223 my $dbname = shift; 224 224 225 if (($stage eq 'stack') or ($stage eq 'diff') or ($stage eq 'SSdiff') ) {225 if (($stage eq 'stack') or ($stage eq 'diff') or ($stage eq 'SSdiff') or $stage eq 'sky') { 226 226 return ""; 227 227 } -
branches/eam_branches/ipp-20100621/ippScripts/scripts/magic_destreak.pl
r28794 r28981 216 216 foreach my $skycell (@$skycells) { 217 217 my $skycell_uri; 218 if ($skycell->{data_state} eq "full" ) {218 if ($skycell->{data_state} eq "full" and $skycell->{quality} = 0) { 219 219 $skycell_uri = $ipprc->filename("PPSUB.OUTPUT", $skycell->{path_base}); 220 220 } else { -
branches/eam_branches/ipp-20100621/ippScripts/scripts/receive_advance.pl
r27954 r28981 69 69 } elsif ($stage eq "camera") { 70 70 $tool_name = "camtool"; 71 } elsif ($stage eq "chip_bg" or $stage = "warp_bg") { 72 $tool_name = "bgtool"; 71 73 } else { 72 74 $tool_name = "${stage}tool"; -
branches/eam_branches/ipp-20100621/ippScripts/scripts/receive_file.pl
r27718 r28981 183 183 $stage = 'raw'; 184 184 $comp_name = 'class_id'; 185 } elsif ($runType eq 'chipBackgroundRun') { 186 $stage = 'chip_bg'; 187 $comp_name = 'class_id'; 185 188 } elsif ($runType eq 'chipRun') { 186 189 $stage = 'chip'; … … 195 198 } elsif ($runType eq 'warpRun') { 196 199 $stage = 'warp'; 200 $comp_name = 'skycell_id'; 201 } elsif ($runType eq 'warpBackgroundRun') { 202 $stage = 'warp_bg'; 197 203 $comp_name = 'skycell_id'; 198 204 } elsif ($runType eq 'diffRun') { -
branches/eam_branches/ipp-20100621/ippScripts/scripts/staticsky.pl
r28154 r28981 99 99 my $nInputs = @$files; 100 100 101 my $configuration = $ipprc->filename("PSPHOT.STACK.CONFIG", $outroot); 102 101 103 foreach my $file (@$files) { 102 104 print $listFile "INPUT METADATA\n"; … … 161 163 $command .= " -threads $threads" if defined $threads; 162 164 $command .= " -recipe PSPHOT $recipe_psphot"; 163 #$command .= " -dumpconfig $configuration";165 $command .= " -dumpconfig $configuration"; 164 166 # $command .= " -tracedest $traceDest -log $logDest"; 165 167 # $command .= " -dbname $dbname" if defined $dbname; -
branches/eam_branches/ipp-20100621/ippTasks
- Property svn:mergeinfo changed
/trunk/ippTasks merged: 28835,28887
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20100621/ippTasks/nightly_stacks.pro
r28794 r28981 7 7 ns.detrends.off 8 8 ns.dqstats.on 9 ns.sweetspot.on 9 10 ns.registration.on 10 11 ns.burntool.on … … 17 18 ns.detrends.off 18 19 ns.dqstats.off 20 ns.sweetspot.off 19 21 ns.registration.off 20 22 ns.burntool.off … … 49 51 end 50 52 53 macro ns.sweetspot.on 54 task ns.sweetspot.load 55 active true 56 end 57 end 58 51 59 macro ns.registration.on 52 60 task ns.registration.load … … 96 104 macro ns.dqstats.off 97 105 task ns.dqstats.load 106 active false 107 end 108 end 109 110 macro ns.sweetspot.off 111 task ns.sweetspot.load 98 112 active false 99 113 end … … 263 277 264 278 command automate_stacks.pl --queue_dqstats --date $today 279 end 280 281 task.exit 0 282 # nothing to do here 283 end 284 # locked list 285 task.exit default 286 showcommand failure 287 end 288 task.exit crash 289 showcommand crash 290 end 291 # operation times out 292 task.exit timeout 293 showcommand timeout 294 end 295 end 296 297 # 298 # Queue sweetspot runs 299 # 300 task ns.sweetspot.load 301 host local 302 periods -poll 3600 303 periods -exec $LOADEXEC 304 periods -timeout 30 305 trange 02:00:00 02:59:59 -nmax 1 306 npending 1 307 308 task.exec 309 stdout $LOGDIR/ns.sweetspot.log 310 stderr $LOGDIR/ns.sweetspot.log 311 $today = `date +%Y-%m-%d` 312 313 command automate_stacks.pl --queue_sweetspot --date $today 265 314 end 266 315 -
branches/eam_branches/ipp-20100621/ippTasks/survey.pro
r28211 r28981 30 30 book create SURVEY_DIST 31 31 book create SURVEY_ADDSTAR 32 book create SURVEY_CHIP_BG 33 book create SURVEY_WARP_BG 32 34 $haveSurveyBooks = TRUE 33 35 end … … 40 42 $SURVEY_DIST_DB = 0 41 43 $SURVEY_ADDSTAR_DB = 0 44 $SURVEY_CHIP_BG_DB = 0 45 $SURVEY_WARP_BG_DB = 0 42 46 43 47 $SURVEY_EXEC = 120 … … 67 71 active true 68 72 end 73 task survey.chip.bg 74 active true 75 end 76 task survey.warp.bg 77 active true 78 end 69 79 end 70 80 … … 89 99 end 90 100 task survey.dist 101 active false 102 end 103 task survey.chip.bg 104 active false 105 end 106 task survey.warp.bg 91 107 active false 92 108 end … … 286 302 end 287 303 304 # user functions to manipulate chip_bg labels 305 macro survey.add.chip.bg 306 if ($0 != 3) 307 echo "USAGE: survey.add.chip.bg (label) (dist_group)" 308 break 309 end 310 book newpage SURVEY_CHIP_BG $1 311 book setword SURVEY_CHIP_BG $1 DIST_GROUP $2 312 book setword SURVEY_CHIP_BG $1 STATE PENDING 313 end 314 315 macro survey.del.chip.bg 316 if ($0 != 2) 317 echo "USAGE: survey.del.chip.bg (label)" 318 break 319 end 320 book delpage SURVEY_CHIP_BG $1 321 end 322 323 macro survey.show.chip.bg 324 if ($0 != 1) 325 echo "USAGE: survey.show.chip.bg" 326 break 327 end 328 book listbook SURVEY_CHIP_BG 329 end 330 331 # user functions to manipulate warp_bg labels 332 macro survey.add.warp.bg 333 if ($0 != 3) 334 echo "USAGE: survey.add.warp.bg (label) (dist_group)" 335 break 336 end 337 book newpage SURVEY_WARP_BG $1 338 book setword SURVEY_WARP_BG $1 DIST_GROUP $2 339 book setword SURVEY_WARP_BG $1 STATE PENDING 340 end 341 342 macro survey.del.warp.bg 343 if ($0 != 2) 344 echo "USAGE: survey.del.warp.bg (label)" 345 break 346 end 347 book delpage SURVEY_WARP_BG $1 348 end 349 350 macro survey.show.warp.bg 351 if ($0 != 1) 352 echo "USAGE: survey.show.warp.bg" 353 break 354 end 355 book listbook SURVEY_WARP_BG 356 end 288 357 289 358 task survey.diff … … 815 884 end 816 885 end 886 887 task survey.chip.bg 888 host local 889 890 periods -poll $SURVEY_POLL 891 periods -exec $SURVEY_EXEC 892 periods -timeout $SURVEY_TIMEOUT 893 npending 1 894 895 stdout $LOGDIR/survey.chip.bg.log 896 stderr $LOGDIR/survey.chip.bg.log 897 898 # generate chip_bg runs 899 task.exec 900 book npages SURVEY_CHIP_BG -var N 901 if ($N == 0) 902 # echo "No labels for processing" 903 break 904 endif 905 906 book getpage SURVEY_CHIP_BG 0 -var label -key STATE NEW 907 if ("$label" == "NULL") 908 # All labels have been done --- reset 909 # echo "Resetting labels" 910 for i 0 $N 911 book getpage SURVEY_CHIP_BG $i -var label 912 book setword SURVEY_CHIP_BG $label STATE NEW 913 end 914 book getpage SURVEY_CHIP_BG 0 -var label -key STATE NEW 915 916 # Select different database 917 $SURVEY_CHIP_BG ++ 918 if ($SURVEY_CHIP_BG >= $DB:n) set SURVEY_CHIP_BG = 0 919 end 920 921 book setword SURVEY_CHIP_BG $label STATE DONE 922 book getword SURVEY_CHIP_BG $label DIST_GROUP -var dist_group 923 924 $run = bgtool -definechip -label $label -set_dist_group $dist_group 925 926 if ($DB:n == 0) 927 option DEFAULT 928 else 929 $run = $run -dbname $DB:$SURVEY_CHIP_BG 930 option $DB:$SURVEY_CHIP_BG 931 end 932 933 echo $run 934 command $run 935 end 936 937 # success 938 task.exit 0 939 # echo "Success" 940 end 941 942 # locked list 943 task.exit default 944 showcommand failure 945 end 946 947 task.exit crash 948 showcommand crash 949 end 950 951 # operation times out? 952 task.exit timeout 953 showcommand timeout 954 end 955 end 956 957 task survey.warp.bg 958 host local 959 960 periods -poll $SURVEY_POLL 961 periods -exec $SURVEY_EXEC 962 periods -timeout $SURVEY_TIMEOUT 963 npending 1 964 965 stdout $LOGDIR/survey.warp.bg.log 966 stderr $LOGDIR/survey.warp.bg.log 967 968 # generate warp_bg runs 969 task.exec 970 book npages SURVEY_WARP_BG -var N 971 if ($N == 0) 972 # echo "No labels for processing" 973 break 974 endif 975 976 book getpage SURVEY_WARP_BG 0 -var label -key STATE NEW 977 if ("$label" == "NULL") 978 # All labels have been done --- reset 979 # echo "Resetting labels" 980 for i 0 $N 981 book getpage SURVEY_WARP_BG $i -var label 982 book setword SURVEY_WARP_BG $label STATE NEW 983 end 984 book getpage SURVEY_WARP_BG 0 -var label -key STATE NEW 985 986 # Select different database 987 $SURVEY_WARP_BG ++ 988 if ($SURVEY_WARP_BG >= $DB:n) set SURVEY_WARP_BG = 0 989 end 990 991 book setword SURVEY_WARP_BG $label STATE DONE 992 book getword SURVEY_WARP_BG $label DIST_GROUP -var dist_group 993 994 $run = bgtool -definewarp -warp_label $label -set_dist_group $dist_group 995 996 if ($DB:n == 0) 997 option DEFAULT 998 else 999 $run = $run -dbname $DB:$SURVEY_WARP_BG 1000 option $DB:$SURVEY_WARP_BG 1001 end 1002 1003 echo $run 1004 command $run 1005 end 1006 1007 # success 1008 task.exit 0 1009 # echo "Success" 1010 end 1011 1012 # locked list 1013 task.exit default 1014 showcommand failure 1015 end 1016 1017 task.exit crash 1018 showcommand crash 1019 end 1020 1021 # operation times out? 1022 task.exit timeout 1023 showcommand timeout 1024 end 1025 end
Note:
See TracChangeset
for help on using the changeset viewer.
