IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2010, 9:16:10 AM (16 years ago)
Author:
eugene
Message:

updates from trunk

Location:
branches/eam_branches/ipp-20100823
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823

  • branches/eam_branches/ipp-20100823/ippScripts/scripts/automate_stacks.pl

    r28982 r29124  
    123123    defined $queue_chips or defined $queue_stacks or $queue_sweetspot or $queue_detrends or $queue_dqstats or
    124124    defined $check_chips or defined $check_stacks or $check_sweetspot or $check_detrends or $check_dqstats or
    125     defined $test_mode or defined $clean_old or defined $check_mode;
     125    defined $test_mode or defined $clean_old or defined $check_mode or
     126    defined $confirm_stacks;
    126127
    127128# Configurable parameters from our config file.
     
    12711272                    print STDERR "confirm_stacks: Target $target on $date is not done stacking. $Nstacks $Nattempted\n"
    12721273                }
     1274                if ($metadata_out{nsState} eq 'CONFIRM_STACKING') {
     1275                    $metadata_out{nsState} = 'STACKING';
     1276                }
     1277                   
    12731278                next;
    12741279            }
    1275             if (defined($pretend)) {
    1276                 add_to_macro_list('check_confirm_stacks',$stackable_list{$target},$date,$target);
    1277             }
    1278             else {
    1279                 add_to_macro_list('confirm_stacks',$stackable_list{$target},$date,$target);
     1280            if ($metadata_out{nsState} eq 'CONFIRM_STACKING') {
     1281                if (defined($pretend)) {
     1282                    add_to_macro_list('check_confirm_stacks',$stackable_list{$target},$date,$target);
     1283                }
     1284                else {
     1285                    add_to_macro_list('confirm_stacks',$stackable_list{$target},$date,$target);
     1286                }
    12801287            }
    12811288        }
  • branches/eam_branches/ipp-20100823/ippScripts/scripts/dist_bundle.pl

    r28963 r29124  
    154154#   2. magic is not required for this distRun
    155155#   3. the processing for the component produced no images (warp or diff with bad quality for example)
    156 my $nan_masked_pixels = ! ($clean || (($stage eq "camera") || ($stage eq 'fake') || ($stage eq 'stack')) || $no_magic || $poor_quality);
     156my $nan_masked_pixels = ! ($clean || (($stage eq "camera") || ($stage eq 'fake') || ($stage eq 'stack') || ($stage eq 'sky')) || $no_magic || $poor_quality);
    157157
    158158my ($image, $mask, $variance);
  • branches/eam_branches/ipp-20100823/ippScripts/scripts/dist_defineruns.pl

    r28536 r29124  
    8383    push @stages, $stage;
    8484} else {
    85     @stages = qw( raw chip chip_bg camera fake warp warp_bg diff stack SSdiff);
     85    @stages = qw( raw chip chip_bg camera fake warp warp_bg diff stack SSdiff sky);
    8686}
    8787
  • branches/eam_branches/ipp-20100823/ippScripts/scripts/magic_destreak_cleanup.pl

    r27785 r29124  
    3838
    3939# Parse the command-line arguments
    40 my ($magic_ds_id, $camera);
     40my ($magic_ds_id, $camera, $stage);
    4141my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile);
    4242
     
    4444           'magic_ds_id=s'  => \$magic_ds_id,# Magic destreak run identifier
    4545           'camera=s'       => \$camera,     # camera for evaluating file rules
     46           'stage=s'        => \$stage,     # camera for evaluating file rules
    4647           'save-temps'     => \$save_temps, # Save temporary files?
    4748           'dbname=s'       => \$dbname,     # Database name
     
    5657           -exitval => 3) unless
    5758    defined $magic_ds_id and
    58     defined $camera;
    59 #    defined $stage and
    60 #    defined $stage_id;
     59    defined $camera and
     60    defined $stage;
    6161
    6262my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
     
    7979my $dbh = DBI->connect($dsn, $dbuser, $dbpassword) or die "Cannot connect to mysql server\n";
    8080
    81 my $q1 = "SELECT magicDSRun.*, camera, camProcessedExp.path_base AS cam_path_base, camRun.reduction AS cam_reduction, magicRun.inverse"
    82          . " FROM magicDSRun JOIN magicRun USING(magic_id) JOIN rawExp USING(exp_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN camRun USING(cam_id)"
    83          . " WHERE magic_ds_id = $magic_ds_id";
     81my $q1;
     82
     83if ($stage ne 'diff') {
     84    $q1 = "SELECT magicDSRun.*, camera, camProcessedExp.path_base AS cam_path_base, camRun.reduction AS cam_reduction"
     85     . " FROM magicDSRun JOIN magicRun USING(magic_id) JOIN rawExp USING(exp_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN camRun USING(cam_id)";
     86} else {
     87    $q1 = "SELECT magicDSRun.*, diffRun.diff_mode FROM magicDSRun JOIN diffRun ON stage_id = diffRun.diff_id AND stage = 'diff'";
     88}
     89$q1 .= " WHERE magic_ds_id = $magic_ds_id";
     90
    8491my $q2 = "SELECT * from magicDSFile where magic_ds_id = $magic_ds_id";
    8592
     
    8996&my_die ("Unable to find magicDSRun $magic_ds_id", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if !$nrows;
    9097my $run = $stmt1->fetchrow_hashref();
     98$stmt1->finish();
    9199
    92100my $state = $run->{state};
    93 my $stage = $run->{stage};
    94101my $stage_id = $run->{stage_id};
    95102my $cam_path_base = $run->{cam_path_base};
    96103my $cam_reduction = $run->{cam_reduction};
    97104$cam_reduction = 'DEFAULT' if !$cam_reduction or ($cam_reduction eq 'NULL');
    98 my $inverse = $run->{inverse};
     105
     106my $warp_warp = ($stage eq 'diff' and $run->{diff_mode} eq 1);
    99107
    100108
     
    105113&my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";
    106114
    107 my $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use
    108 &my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro;
     115my $recipe_psastro;
     116if ($stage eq 'chip') {
     117    $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use
     118    &my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro;
     119}
    109120
    110121
     
    217228        delete_files($rimage, $rmask, $rweight, $rsources, $rastrom, $bimage, $bmask, $bweight, $bsources, $bastrom, $bch_mask, $rch_mask);
    218229
    219         if ($stage eq "diff" and $inverse) {
     230        if ($stage eq "diff" and $warp_warp) {
    220231            my $name = "PPSUB.INVERSE";
    221232            if ($backup_path_base) {
  • branches/eam_branches/ipp-20100823/ippScripts/scripts/staticsky.pl

    r28962 r29124  
    7171$ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $sky_id, $PS_EXIT_SYS_ERROR ) if $redirect;
    7272
     73my $traceDest      = $ipprc->filename("TRACE.EXP", $outroot);
    7374# my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_STATICSKY);
    7475
     
    164165    $command .= " -recipe PSPHOT $recipe_psphot";
    165166    $command .= " -dumpconfig $configuration";
    166     # $command .= " -tracedest $traceDest -log $logDest";
     167    $command .= " -tracedest $traceDest -log $logDest";
    167168    # $command .= " -dbname $dbname" if defined $dbname;
    168169    # $command .= " -image_id $diff_skyfile_id" if defined $diff_skyfile_id;
Note: See TracChangeset for help on using the changeset viewer.