IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 15, 2010, 11:02:40 AM (16 years ago)
Author:
bills
Message:

fail if --update and the component is not faulted. redirect output if update
add pod documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/runwarpskycell.pl

    r29142 r29159  
    3636my $dbh = getDBHandle();
    3737
    38 my $query1 = "SELECT warpSkyfile.path_base, warp_skyfile_id, warpRun.tess_id, warpRun.reduction, chipRun.magicked, rawExp.camera, warpRun.state FROM warpRun JOIN warpSkyfile USING(warp_id) JOIN warpImfile USING(warp_id, skycell_id) JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE warp_id = $warp_id AND skycell_id = '$skycell_id'";
     38my $query1 = "SELECT warpSkyfile.path_base, warpSkyfile.fault, warp_skyfile_id, warpRun.tess_id, warpRun.reduction, chipRun.magicked, rawExp.camera, warpRun.state FROM warpRun JOIN warpSkyfile USING(warp_id) JOIN warpImfile USING(warp_id, skycell_id) JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE warp_id = $warp_id AND skycell_id = '$skycell_id'";
    3939
    4040my $stmt1 = $dbh->prepare($query1);
     
    4949my $camera = $results->{camera};
    5050my $state = $results->{state};
     51my $fault = $results->{fault};
    5152
     53die "cannot update database for a skycell that is not faulted\n" if $update and !$fault;
    5254
    5355die "path_base not found\n" if !$path_base;
     
    121123}
    122124
     125__END__
     126
     127=pod
     128
     129=head1 NAME
     130
     131runwarpskyfile.pl - gather the parameters for and execute warp_skycell.pl
     132
     133=head1 SYNOPSIS
     134   
     135    perl runwarpskyfile.pl --warp_id <warp_id> --skycell_id <skycell_id> [--threads <num_threads>] [--update] [--redirect-output] [--pretend] [--dbname <dbname>]
     136
     137Query the database for the results of a warp skycell and rerun the processing, optionally reverting a faulted
     138run.
     139
     140=over 4
     141
     142=item * --warp_id <warp_id>
     143
     144The id of the warpSkyfile run to process.
     145
     146=item * --skycell_id <skycell_id>
     147
     148The skycell_id of the warpSkyfile run to process.
     149
     150=item * --threads <num_threads>
     151
     152The number of threads to use. Default 1.
     153Optional.
     154
     155
     156=item * --update
     157
     158Revert a faulted skycell before processing. If the skycell is not faulted no processing is done.
     159WARNING: insure that the standard science procesing either has warp stage turned off or the
     160label of this warpRun ommited from the list of labels otherwise it may attempt to processes this run at the same time.
     161Optional.
     162
     163=item *  --redirect-output
     164
     165Send the output of the command to the logfile. (This is the default if --update is supplied).
     166Optional.
     167
     168=item * --pretend
     169
     170Just print the commands that would be executed, but do not run them.
     171Optional.
     172
     173=item * --dbname <dbname>
     174
     175Name of the IPP databse to query. Default is 'gpc1'.
     176Optional.
     177
     178
     179=head1 SEE ALSO
     180L<runchipimfile.pl>, L<runcameraexp.pl>, L<rundiffskyfile.pl>
     181
     182=cut
Note: See TracChangeset for help on using the changeset viewer.