IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 6, 2012, 2:11:32 PM (14 years ago)
Author:
bills
Message:

During update, do not rerun photometry just because the sources file does not exist.
They are cleaned up now

File:
1 edited

Legend:

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

    r33052 r34771  
    150150$outputStats   = prepare_output("PPIMAGE.STATS",         $outroot, $class_id, 1);
    151151my $do_binned_images = 1;
     152
    152153if ($run_state eq 'new') {
    153154    # prepare the files that are only created for a new run
     
    586587
    587588# check whether psphot outputs should be regenerated.
    588 # Whether we need to or not is a somewhat complicated question.
     589# Whether we need to or not was a somewhat complicated question. Since we clean cmfs now we only rerun
     590# photometry if the psf file has gone missing since it is needed to run warps
     591
    589592sub rerun_photometry
    590593{
     
    594597                    or &my_die("Missing entry from camera config: PSPHOT.OUTPUT", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    595598
     599    my $update_sources_if_gone = 0; # set this to regenerate sources if gone.
     600                                    # We no longer do this as of 2012-12
    596601    my $make_sources = 0;
    597602    my $sources_available = 0;
     
    599604        $sources_available = 1;
    600605    } else {
    601         carp "WARNING: photometry sources file $outputSources is not available";
    602         my $gone;
    603         if (storage_object_exists($outputSources, \$gone)) {
    604             # check whether the file is permanantely or temporarily gone
    605             if ($gone) {
    606                 carp "WARNING: photometry sources storage object exists but all instances are permanently gone";
     606        if ($update_sources_if_gone) {
     607            carp "WARNING: photometry sources file $outputSources is not available";
     608            my $gone;
     609            if (storage_object_exists($outputSources, \$gone)) {
     610                # check whether the file is permanantely or temporarily gone
     611                if ($gone) {
     612                    carp "WARNING: photometry sources storage object exists but all instances are permanently gone";
     613                    $make_sources = 1;
     614                }
     615            } else {
     616                # storage object must have been deleted
    607617                $make_sources = 1;
    608618            }
    609         } else {
    610             # storage object must have been deleted
    611             $make_sources = 1;
    612619        }
    613620    }
     
    616623    my $psf_available = 0;
    617624    my $outputPsf = $ipprc->filename("PSPHOT.PSF.SAVE",       $outroot, $class_id)
    618                     or &my_die("Missing entry from camera config: PSPHOT.PSF.SAVE", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     625                    or &my_die("Missing entry from camera config: PSPHOT.PSF.SAVE",
     626                                $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     627
    619628    if ($ipprc->file_exists($outputPsf)) {
    620629        $psf_available = 1;
     
    638647    }
    639648
    640     # if either of the files are gone rerun photometry unless the other file is temporarily not available
    641 
    642     if (!$sources_available && !$make_sources) {
    643         # destreak will die if the sources is not available
    644         &my_die("PSPHOT.SOURCES is missing but we cannot regenerate it", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    645     }
     649    if ($update_sources_if_gone) {
     650        if (!$sources_available && !$make_sources) {
     651            # destreak will die if the sources is not available
     652            # but magic is dead....
     653            &my_die("PSPHOT.SOURCES is missing but we cannot regenerate it", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     654        }
     655    }
     656
    646657    if (!$psf_available && !$make_psf) {
    647658        # warp updates need the psf file
Note: See TracChangeset for help on using the changeset viewer.