IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11355


Ignore:
Timestamp:
Jan 27, 2007, 5:32:31 PM (19 years ago)
Author:
eugene
Message:

working towards addstar and mosastro

File:
1 edited

Legend:

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

    r11333 r11355  
    5353my $p3tool = can_run('p3tool') or (warn "Can't find p3tool" and $missing_tools = 1);
    5454my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1);
     55
     56# test for addstar and psastro:
     57my $psastro = can_run('psastro') or (warn "Can't find psastro" and $missing_tools = 1);
     58my $addstar = can_run('addstar') or (warn "Can't find addstar" and $missing_tools = 1);
     59
    5560if ($missing_tools) {
    5661    warn("Can't find required tools.");
     
    7681        &my_die("Unable to parse metadata list", $exp_tag, $PS_EXIT_PROG_ERROR);
    7782}
    78 
    79 # XXX need to add the psastro +mosastro step here
    80 # XXX need to add the addstar step here
    8183
    8284# Gather the statistics
     
    121123}
    122124
     125# make this a function which generates a specific list file for a specific filename
     126
    123127# Generate the file list, and get the statistics
    124128my $outputRoot = $exp_tag . '.p3'; # Root output name
     
    131135open my $list2File, '>' . $list2Name;
    132136foreach my $file (@$files) {
    133     print $list1File ($ipprc->convert_filename_absolute($file->{b1_uri}) . "\n");
    134     print $list2File ($ipprc->convert_filename_absolute($file->{b2_uri}) . "\n");
     137    # use the b1_uri as OUTPUT root and convert the filenames
     138    # with ipprc->filename:
     139    my $classID = $file->{class_id};
     140    my $fileRoot = $file->{b1_uri};
     141    print $list1File $ipprc->filename("PPIMAGE.BIN1", $file->{b1_uri}, $classID);
     142    print $list2File $ipprc->filename("PPIMAGE.BIN2", $file->{b1_uri}, $classID);
     143    print $list1File $ipprc->filename("PSPHOT.OUTPUT", $file->{b1_uri}, $classID);
     144    print $list1File $ipprc->filename("PSASTRO.OUTPUT", $file->{b1_uri}, $classID);
     145    # XXX PSASTRO.OUTPUT is explicitly a CHIP output file
     146    # XXX below the PSASTRO.OUTPUT must be an FPA output file
     147    # print $list1File ($ipprc->convert_filename_absolute($file->{b1_uri}) . "\n");
     148    # print $list2File ($ipprc->convert_filename_absolute($file->{b2_uri}) . "\n");
    135149    push @means, $file->{bg};
    136150    push @stdevs, $file->{bg_stdev};
     
    142156my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    143157my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     158my $objects = $ipprc->filename("PSASTRO.OUTPUT", $outputRoot); # MEF psastro output
     159
     160# if file == CHIP
     161#    run psastro +mosastro on PSASTRO.OUTPUT.CHIP
     162#    run addstar on PSASTRO.OUTPUT.FPA
     163
     164# if file == FPA
     165#    run addstar on PSASTRO.OUTPUT.CHIP
    144166
    145167# Make the jpeg for binning 1
     
    167189}
    168190
    169 
     191# XXX keep the same outroot as the input
    170192# Add the result into the database
    171193$outputRoot = $ipprc->convert_filename_relative($outputRoot);
Note: See TracChangeset for help on using the changeset viewer.