IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2009, 3:46:48 PM (17 years ago)
Author:
Paul Price
Message:

Adding the Dave Monet filter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/publish_file.pl

    r25256 r25927  
    3232my $difftool = can_run('difftool') or (warn "Can't find difftool" and $missing_tools = 1);
    3333my $ppMops = can_run('ppMops') or (warn "Can't find ppMops" and $missing_tools = 1);
     34my $ppMonet = can_run('ppMonet') or (warn "Can't find ppMonet" and $missing_tools = 1);
    3435my $dsreg = can_run('dsreg') or (warn "Can't find dsreg" and $missing_tools = 1);
    3536if ($missing_tools) {
     
    100101    my $file = $ipprc->filename( "PSASTRO.OUTPUT", $path_base );
    101102    $file = $ipprc->file_resolve($file);
     103    my $exp_name = $comp->{exp_name};
     104    my $exp_id = $comp->{exp_id};
     105    my $chip_id = $comp->{chip_id};
    102106    my $cam_id = $comp->{cam_id};
     107    my $zp = $comp->{zpt_obs};
     108    my $zp_err = $comp->{zpt_stdev};
     109    my $astrom = sqrt($comp->{sigma_ra}**2 + $comp->{sigma_dec}**2);
    103110    my $name = "cam_$cam_id";
     111
     112    if ($product eq "MONET") {
     113        my $output = $ipprc->file_resolve( "$outroot.csv.gz", 'create' ) or
     114            &my_die( "Unable to resolve output file", $pub_id, $PS_EXIT_SYS_ERROR);
     115
     116        my $command = "$ppMonet $file $output";
     117        $command .= " -exp_name " . $exp_name if defined $exp_name;
     118        $command .= " -exp_id " . $exp_id if defined $exp_id;
     119        $command .= " -chip_id " . $chip_id if defined $chip_id;
     120        $command .= " -cam_id " . $cam_id if defined $cam_id;
     121        $command .= " -zp " . $zp if defined $zp;
     122        $command .= " -zp_error " . $zp_err if defined $zp_err;
     123        $command .= " -astrom_rms " . $astrom if defined $astrom;
     124
     125        unless ($no_op) {
     126            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     127                run(command => $command, verbose => $verbose);
     128            &my_die( "Unable to translate", $pub_id, $PS_EXIT_SYS_ERROR) unless $success;
     129            &my_die( "Unable to find translated file $output", $pub_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $output );
     130        } else {
     131            print "Not running: $command\n";
     132        }
     133
     134        $file = $output;
     135    }
    104136    print $dsFile "$file|||$product|$name|\n";
     137
    105138} elsif ($stage eq 'diff') {
    106139    my $command =  "difftool -diffskyfile -diff_id $stage_id";
Note: See TracChangeset for help on using the changeset viewer.