IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2012, 11:20:28 AM (14 years ago)
Author:
bills
Message:

Revert back to r29305 to produce only version 1 request files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/psmkreq

    r34597 r34611  
    3131my ($unconvolved, $use_imfile_id, $no_wait);
    3232
    33 my $action = 'PROCESS';
    34 my $username = 'null';
    35 my $email = 'null';
    3633my $default_size = 100;
    3734my $job_type     = 'stamp';
     
    5552my $comment;
    5653
    57 my $survey_name = 'null';
    58 my $release = 'null';
    59 my $stack_type = 'null';
    60 my $bgrestore;
    61 my $jpeg;
    62 my $nocompress;
    63 
    6454my $missing_tools;
    6555my $pstamp_request_file  = can_run('pstamp_request_file')  or (warn "Can't find required program pstamp_request_file"  and $missing_tools = 1);
     
    7868    'width=i'           => \$width,
    7969    'height=i'          => \$height,
    80 # pixcenter is deprecated
    81 #    'pixcenter'         => \$pixcenter,
     70    'pixcenter'         => \$pixcenter,
    8271    'arcseconds'        => \$arcseconds,
    8372    'coord_mask=i'      => \$coord_mask,
     
    9887    'comment=s'         => \$comment,
    9988
    100     # new columns for version 2
    101     'action=s'          => \$action,
    102     'usernam=s'         => \$username,
    103     'email=s'           => \$email,
    104     'survey=s'          => \$survey_name,
    105     'release=s'         => \$release,
    106     'stack_type'        => \$stack_type,
    107 
    10889    'option_mask=i'     => \$option_mask,
    10990    'image'             => \$image,
    11091    'mask'              => \$mask,
    11192    'variance'          => \$variance,
    112     'sources'           => \$cmf,
     93    'cmf'               => \$cmf,
    11394    'psf'               => \$psf,
    11495    'backmdl'           => \$backmdl,
     
    11899    'do_not_wait'       => \$no_wait,
    119100
    120     # new options for version 2
    121     'no_compress'       => \$nocompress,
    122     'bgrestore'         => \$bgrestore,
    123 
    124101    'verbose'           => \$verbose,
    125102    'save-temps'        => \$save_temps,
     
    133110
    134111pod2usage( -msg => "Invalid job_type: $job_type", -exitval =>1 )
    135         unless ($job_type eq 'stamp' or $job_type eq 'get_image' or $job_type eq 'listtargets');
    136 
    137 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') {
    138115    if (defined $list) {
    139116        pod2usage( -msg => "--ra --dec --x --y are not used with --list", -exitval =>1 )
     
    175152$id = 0 if !$id;
    176153
    177 
    178 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') {
    179     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";
    180156}
    181157
     
    231207} else {
    232208    $rows = [];
    233     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);
    234210}
    235211
    236212my ($tdf, $table_def_name) = tempfile ("/tmp/tabledef.XXXX", UNLINK => !$save_temps);
    237 print $tdf "$req_name 2 $action $username $email\n";
     213print $tdf "$req_name 1\n";
    238214my $rownum = 0;
    239215foreach my $row (@$rows) {
    240216    $rownum++;
    241217    my $line = "$rownum $row->{ra}\t$row->{dec}\t$width $height"
    242         . " $coord_mask $job_type $option_mask $project $row->{survey_name} $row->{release} $req_type"
     218        . " $coord_mask $job_type $option_mask $project $req_type"
    243219        . " $stage $id $tess_id $component $data_group"
    244         . " $row->{filter} $row->{mjd_min} $row->{mjd_max} $row->{stack_type}";
     220        . " $row->{filter} $row->{mjd_min} $row->{mjd_max}";
    245221
    246222    if ($row->{comment} and $row->{comment} ne '') {
     
    254230}
    255231close $tdf;
    256 
    257 system "cat $table_def_name";
    258 #exit 0;
    259232
    260233{
     
    304277    $row->{dec}     = checkDEC($vals[1], $linenumber);
    305278    $row->{filter}  = checkFilter($vals[2], $filter, $linenumber);
    306     $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber);
    307     $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber);
    308     $row->{survey_name}  = $vals[5];
    309     $row->{release} = $vals[6];
    310     $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);;
    311281    $row->{comment} = $comment;
    312282
Note: See TracChangeset for help on using the changeset viewer.