IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2012, 2:15:01 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120905
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905

  • branches/eam_branches/ipp-20120905/pstamp/scripts

  • branches/eam_branches/ipp-20120905/pstamp/scripts/psmkreq

    r34466 r34735  
    5252my $comment;
    5353
    54 my $survey_name = 'null';
    55 my $release = 'null';
    56 my $stack_type = 'null';
    57 my $bgrestore;
    58 my $jpeg;
    59 my $nocompress;
    60 
    6154my $missing_tools;
    6255my $pstamp_request_file  = can_run('pstamp_request_file')  or (warn "Can't find required program pstamp_request_file"  and $missing_tools = 1);
     
    7568    'width=i'           => \$width,
    7669    'height=i'          => \$height,
    77 # pixcenter is deprecated
    78 #    'pixcenter'         => \$pixcenter,
     70    'pixcenter'         => \$pixcenter,
    7971    'arcseconds'        => \$arcseconds,
    8072    'coord_mask=i'      => \$coord_mask,
     
    9587    'comment=s'         => \$comment,
    9688
    97     # new columns for version 2
    98     'survey=s'          => \$survey_name,
    99     'release=s'         => \$release,
    100     'stack_type'        => \$stack_type,
    101 
    10289    'option_mask=i'     => \$option_mask,
    10390    'image'             => \$image,
    10491    'mask'              => \$mask,
    10592    'variance'          => \$variance,
    106     'sources'           => \$cmf,
     93    'cmf'               => \$cmf,
    10794    'psf'               => \$psf,
    10895    'backmdl'           => \$backmdl,
     
    11299    'do_not_wait'       => \$no_wait,
    113100
    114     # new options for version 2
    115     'no_compress'       => \$nocompress,
    116     'bgrestore'         => \$bgrestore,
    117 
    118101    'verbose'           => \$verbose,
    119102    'save-temps'        => \$save_temps,
     
    127110
    128111pod2usage( -msg => "Invalid job_type: $job_type", -exitval =>1 )
    129         unless ($job_type eq 'stamp' or $job_type eq 'get_image' or $job_type eq 'listtargets');
    130 
    131 if (($job_type eq 'stamp') or ($job_type eq 'listtargets')) {
     112        unless ($job_type eq 'stamp' or $job_type eq 'get_image');
     113
     114if ($job_type eq 'stamp') {
    132115    if (defined $list) {
    133116        pod2usage( -msg => "--ra --dec --x --y are not used with --list", -exitval =>1 )
     
    169152$id = 0 if !$id;
    170153
    171 
    172 unless (($job_type eq 'listtargets' and $stage eq 'exposure') or $stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') {
    173     die "$stage is not a valid stage for $job_type jobs\n";
     154unless ($stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') {
     155    die "$stage is not a valid value for stage\n";
    174156}
    175157
     
    225207} else {
    226208    $rows = [];
    227     push @$rows, buildRow("", $comment, $x, $y, $filter, $mjd_min, $mjd_max, $survey_name, $release, $stack_type);
     209    push @$rows, buildRow("", $comment, $x, $y, $filter, $mjd_min, $mjd_max);
    228210}
    229211
    230212my ($tdf, $table_def_name) = tempfile ("/tmp/tabledef.XXXX", UNLINK => !$save_temps);
    231 print $tdf "$req_name 2\n";
     213print $tdf "$req_name 1\n";
    232214my $rownum = 0;
    233215foreach my $row (@$rows) {
    234216    $rownum++;
    235217    my $line = "$rownum $row->{ra}\t$row->{dec}\t$width $height"
    236         . " $coord_mask $job_type $option_mask $project $row->{survey_name} $row->{release} $req_type"
     218        . " $coord_mask $job_type $option_mask $project $req_type"
    237219        . " $stage $id $tess_id $component $data_group"
    238         . " $row->{filter} $row->{mjd_min} $row->{mjd_max} $row->{stack_type}";
     220        . " $row->{filter} $row->{mjd_min} $row->{mjd_max}";
    239221
    240222    if ($row->{comment} and $row->{comment} ne '') {
     
    248230}
    249231close $tdf;
    250 
    251 system "cat $table_def_name";
    252 #exit 0;
    253232
    254233{
     
    298277    $row->{dec}     = checkDEC($vals[1], $linenumber);
    299278    $row->{filter}  = checkFilter($vals[2], $filter, $linenumber);
    300     $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber);
    301     $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber);
    302     $row->{survey_name}  = $vals[5];
    303     $row->{release} = $vals[6];
    304     $row->{stack_type} = $vals[7];
     279    $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber);;
     280    $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber);;
    305281    $row->{comment} = $comment;
    306282
Note: See TracChangeset for help on using the changeset viewer.