IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 14, 2012, 3:05:17 PM (14 years ago)
Author:
heather
Message:

dvodb changes: staticsky and staticsky_multi are now just staticsky

File:
1 edited

Legend:

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

    r33038 r33525  
    117117
    118118my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT", $stageroot) or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR);
     119my $fpaObjectsAlt = $fpaObjects;
     120
    119121
    120122if ($stage =~ /cam/) {
     
    162164if (($stage =~/staticsky/) || ($stage =~/stack/)) {
    163165    $fpaObjects =~ s/smf$/cmf/;
    164 }
    165 if ($stage =~/staticsky_multi/) {
     166    $fpaObjectsAlt =~ s/smf$/cmf/;
     167}
     168my $checkalt = 0;
     169if ($stage =~/staticsky/) {
    166170    $fpaObjects =~ s/smf$/cmf/; #this should do nothing because it was already modded above
    167171    &my_die( "can't find the filter_num for staticsky_multi, giving up.", $add_id, $PS_EXIT_SYS_ERROR) unless (defined $multi_num);
    168172    my $nice_num = sprintf ("%03d", $multi_num);
    169173    $fpaObjects =~ s/cmf$/$nice_num.cmf/;  #this make it look for .001.cmf, etc
     174    if ($multi_num == 0) {
     175        $checkalt =1 ; #if it's staticsky and multi_num = 0 there's an alternate file to try if this one doesn't work
     176    }
    170177}
    171178
     
    222229            # get the names for the camera and the real input file
    223230            my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar
    224             my $realFile = $ipprc->file_resolve($fpaObjects) or &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR);
    225            
     231           
     232            my $realFile = $ipprc->file_resolve($fpaObjects);
     233            if (!defined($realFile)) {
     234                print "can't find $fpaObjects\n";
     235                if ($checkalt)  {
     236                    $realFile = $ipprc->file_resolve($fpaObjectsAlt) or &my_die("Unable to resolve $fpaObjectsAlt", $add_id, $PS_EXIT_SYS_ERROR);
     237                    $fpaObjects = $fpaObjectsAlt; # want to make sure the correct value is used.
     238                } else {
     239                    # try the 'good one' again and fail i
     240                    #$realFile = $ipprc->file_resolve($fpaObjects) or
     241                    &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR);
     242                }
     243               
     244            }
     245
    226246            # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default)
    227247            my $command  = "$addstar -update"; # XXX optionally set -update?
Note: See TracChangeset for help on using the changeset viewer.