IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 19, 2013, 3:42:02 PM (13 years ago)
Author:
eugene
Message:

merged from trunk

Location:
branches/eam_branches/ipp-20130307
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307

  • branches/eam_branches/ipp-20130307/DataStore/lib/DataStore/Utils.pm

    r34370 r35413  
    4242$BYTE_FIELD = qr/^\d+$/;
    4343$MD5_FIELD = qr/^[0-9a-f]{32}$/;
    44 %KNOWN_FILE_TYPES = map { $_ => 1 } qw( chip psrequest psresults pstamp chipproc warp stack diff ipp-mops table text xml tgz fits IPP-MOPS notset );
     44%KNOWN_FILE_TYPES = map { $_ => 1 } qw( chip psrequest psresults pstamp chipproc warp stack diff ipp-mops table text xml tgz fits IPP-MOPS IPP-PSPS ipp-psps notset );
    4545%KNOWN_FILESET_TYPES = map { $_ => 1 } qw( OBJECT BIAS DARK SKYFLAT DOMEFLAT OOF SHACKHARTMANN PSREQUEST PSRESULTS IPP-MOPS XRAY FOCUS MOPS_DETECTABILITY_QUERY MOPS_DETECTABILITY_RESPONSE MOPS_TRANSIENT_DETECTIONS LED notset IPP_PSPS IPP-DIST table);
    4646%KNOWN_PRODUCT_TYPES = map { $_ => 1 } qw( image dump psrequest psresults table ipp-dist ipp-misc dqresults);
  • branches/eam_branches/ipp-20130307/DataStoreServer/scripts/dsreg

    r30455 r35413  
    236236    $dbh->disconnect();
    237237
    238     if ($remove) {
     238    if ($remove and -e $fileset_dir) {
    239239        my $rc;
    240         if (($rc = system "rm -r $fileset_dir")) {
     240        if (($rc = system "rm -rf $fileset_dir")) {
    241241            &my_die("failed to remove $fileset_dir error code: $rc", $PS_EXIT_UNKNOWN_ERROR);
    242242        }
  • branches/eam_branches/ipp-20130307/Nebulous

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/Nebulous-Server

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm

    r35350 r35413  
    1515our @EXPORT_OK = qw(
    1616                    locate_images
     17                    locate_images_for_row
    1718                    resolve_project
    1819                    getCamRunByCamID
    … …  
    4647my $last_project = "";
    4748
    48 my ($regtool, $chiptool, $camtool, $warptool, $stacktool, $difftool);
     49my ($regtool, $chiptool, $camtool, $warptool, $stacktool, $difftool, $releasetool);
    4950my ($pstamptool, $dvoImagesAtCoords, $whichimage, $ppConfigDump);
    5051
    … …  
    5657    my $rowList  = shift;   # required
    5758    my $req_type = shift;   # required
    58     my $img_type = shift;   # required
     59    my $stage = shift;   # required
    5960    my $id       = shift;   # required unless req_type eq bycoord or byskycell
    6061    my $tess_id  = shift;
    … …  
    7879           ($req_type ne "byskycell");
    7980
    80     $default_data_groups = load_data_groups($verbose);
     81    if (!$data_group and !$default_data_groups) {
     82        $default_data_groups = load_data_groups($verbose);
     83    }
    8184
    8285    my $dateobs_begin;
    … …  
    104107        my $x = $row->{CENTER_X};
    105108        my $y = $row->{CENTER_Y};
    106         my $results = lookup_bycoord($ipprc, $rowList, $imagedb, $img_type, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max, $verbose);
     109        my $results = lookup_bycoord($ipprc, $row, $imagedb, $stage, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max, $verbose);
    107110        return $results;
    108111    }
    109112
    110     if (($req_type eq "byid") and ($img_type eq "diff")) {
     113    if (($req_type eq "byid") and ($stage eq "diff")) {
    111114        # lookups of all of the information for diff images requires a two level lookup to
    112115        # get the exposure information. Switching the req_type allows us to keep that code
    113116        # in one place
    114117        $req_type = "bydiff";
    115         my $results = lookup_diff($ipprc, $rowList, $imagedb, $id, $component, 1, $option_mask, $img_type, $verbose);
     118        my $results = lookup_diff($ipprc, $rowList, $imagedb, $id, $component, 1, $option_mask, $stage, $verbose);
    116119        return $results;
    117120    }
    … …  
    120123        # for bydiff reuqests we go look up the diffRun to obtain exp_id, chip_id, warp_id, stack_id, or
    121124        # the image from the diffRun
    122         my $results = lookup_diff($ipprc, $rowList, $imagedb, $id, $component, 0, $option_mask, $img_type, $verbose);
     125        my $results = lookup_diff($ipprc, $rowList, $imagedb, $id, $component, 0, $option_mask, $stage, $verbose);
    123126        if (!$results) {
    124127            return undef;
    125128        }
    126         if ($img_type eq "diff") {
     129        if ($stage eq "diff") {
    127130            # lookup_diff has done all of the work
    128131            return $results;
    … …  
    130133
    131134        my $image = $results->[0];
    132         if ($img_type eq "raw") {
     135        if ($stage eq "raw") {
    133136            $req_type = "byid";
    134137            $id = $image->{exp_id};
    135138            return undef if !$id;
    136139            # fall through and lookup byid
    137         } elsif ($img_type eq "chip") {
     140        } elsif ($stage eq "chip") {
    138141            $req_type = "byid";
    139142            $id = $image->{chip_id};
    140143            return undef if !$id;
    141144            # fall through and lookup byid
    142         } elsif ($img_type eq "warp") {
     145        } elsif ($stage eq "warp") {
    143146            $req_type = "byid";
    144147            $id = $image->{warp_id};
    … …  
    146149            return undef if !$id;
    147150            # fall through and lookup by warp_id
    148         } elsif ($img_type eq "stack") {
     151        } elsif ($stage eq "stack") {
    149152            $req_type = "byid";
    150153            $id = $image->{stack_id};
    … …  
    153156        } else {
    154157            # This is checked this elsewhere?
    155             print STDERR "Error: $img_type is an unknown image type\n";
     158            print STDERR "Error: $stage is an unknown image type\n";
    156159            return undef;
    157160        }
    158161    } elsif ($req_type eq "byskycell") {
    159         if (($img_type eq "raw") or ($img_type eq "chip")) {
     162        if (($stage eq "raw") or ($stage eq "chip")) {
    160163            print STDERR "REQ_TYPE byskycell not supported for IMG_TYPE raw or chip\n";
    161164            return undef;
    … …  
    167170    }
    168171
    169     my $results = lookup($ipprc, $rowList, $imagedb, $req_type, $img_type, $id, $tess_id, $component,
    170         $need_magic, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max, $verbose);
     172    my $results = lookup($ipprc, $rowList, $imagedb, $req_type, $stage, $id, $tess_id, $component,
     173        $need_magic, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max,
     174        undef, undef, undef, $verbose);
     175
     176    return $results;
     177}
     178
     179sub locate_images_for_row {
     180    my $ipprc    = shift;
     181    my $imagedb  = shift;
     182    my $camera   = shift;
     183    my $row      = shift;
     184    my $verbose  = shift;
     185
     186    my $req_type  = $row->{REQ_TYPE};
     187
     188    # we die in response to bad data in request files
     189    # The caller is responsible for updating the database
     190    # pstampparse.pl error checks now so this shouldn't happen
     191    &my_die("Unknown req_type: $req_type", $PS_EXIT_PROG_ERROR)
     192        if ($req_type ne "byid") and
     193           ($req_type ne "byexp") and
     194           ($req_type ne "bycoord") and
     195           ($req_type ne "bydiff") and
     196           ($req_type ne "byskycell");
     197
     198    my $stage     = $row->{IMG_TYPE};
     199    my $id        = $row->{ID};
     200    my $component = $row->{COMPONENT};
     201    my $tess_id   = $row->{TESS_ID};
     202
     203    my $filter    = $row->{REQFILT};
     204    my $mjd_min   = $row->{MJD_MIN};
     205    my $mjd_max   = $row->{MJD_MAX};
     206    my $data_group = $row->{DATA_GROUP};
     207    if (isnull($data_group) and !$default_data_groups) {
     208        $default_data_groups = load_data_groups($verbose);
     209    }
     210
     211    my $rownum     = $row->{ROWNUM};
     212    my $job_type   = $row->{JOB_TYPE};
     213    my $option_mask= $row->{OPTION_MASK};
     214
     215    my $dateobs_begin;
     216    my $dateobs_end;
     217    if (!iszero($mjd_min)) {
     218        $dateobs_begin = mjd_to_dateobs($mjd_min);
     219    }
     220    if (!iszero($mjd_max)) {
     221        $dateobs_end = mjd_to_dateobs($mjd_max);
     222    }
     223    if (isnull($tess_id)) {
     224        $tess_id = undef;
     225    }
     226    if (isnull($data_group)) {
     227        $data_group = undef;
     228    }
     229    if (isnull($filter)) {
     230        $filter = undef;
     231    }
     232
     233    if ($req_type eq "bycoord") {
     234        my $x = $row->{CENTER_X};
     235        my $y = $row->{CENTER_Y};
     236        my $results = lookup_bycoord($ipprc, $row, $imagedb, $stage, $tess_id, $component, 0, $x, $y, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max, $verbose);
     237        return $results;
     238    }
     239
     240    # for compatability with the lower level functions that haven't been converted to take a single row
     241    my $rowList = [$row];
     242
     243    if (($req_type eq "byid") and ($stage eq "diff")) {
     244        # lookups of all of the information for diff images requires a two level lookup to
     245        # get the exposure information. Switching the req_type allows us to keep that code
     246        # in one place
     247        $req_type = "bydiff";
     248        my $results = lookup_diff($ipprc, $rowList, $imagedb, $id, $component, 1, $option_mask, $stage, $verbose);
     249        return $results;
     250    }
     251
     252    my ($release_name, $survey) = get_release_info($row);
     253
     254    if ($req_type eq "bydiff") {
     255        # for bydiff reuqests we go look up the diffRun to obtain exp_id, chip_id, warp_id, stack_id, or
     256        # the image from the diffRun
     257        my $results = lookup_diff($ipprc, $rowList, $imagedb, $id, $component, 0, $option_mask, $stage, $verbose);
     258        if (!$results) {
     259            return undef;
     260        }
     261        if ($stage eq "diff") {
     262            # lookup_diff has done all of the work
     263            return $results;
     264        }
     265
     266        my $image = $results->[0];
     267        if ($stage eq "raw") {
     268            $req_type = "byid";
     269            $id = $image->{exp_id};
     270            return undef if !$id;
     271            # fall through and lookup byid
     272        } elsif ($stage eq "chip") {
     273            $req_type = "byid";
     274            $id = $image->{chip_id};
     275            return undef if !$id;
     276            # fall through and lookup byid
     277        } elsif ($stage eq "warp") {
     278            $req_type = "byid";
     279            $id = $image->{warp_id};
     280            $component = $image->{skycell_id};
     281            return undef if !$id;
     282            # fall through and lookup by warp_id
     283        } elsif ($stage eq "stack") {
     284            $req_type = "byid";
     285            $id = $image->{stack_id};
     286            return undef if !$id;
     287            # fall though and lookup by stack_id
     288        } else {
     289            # This is checked this elsewhere?
     290            print STDERR "Error: $stage is an unknown image type\n";
     291            return undef;
     292        }
     293    } elsif ($req_type eq "byskycell") {
     294        if (($stage eq "raw") or ($stage eq "chip")) {
     295            print STDERR "REQ_TYPE byskycell not supported for IMG_TYPE raw or chip\n";
     296            return undef;
     297        }
     298        if (!$tess_id or !$component) {
     299            print STDERR "component and tess_id are required for REQ_TYPE byskycell\n";
     300            return undef;
     301        }
     302    }
     303
     304    my $results = lookup($ipprc, $rowList, $imagedb, $req_type, $stage, $id, $tess_id, $component,
     305        0, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max,
     306        undef, $release_name, $survey,
     307        $verbose);
    171308
    172309    return $results;
    … …  
    193330    my $mjd_min = shift;
    194331    my $mjd_max = shift;
     332    my $selectedAstrom = shift;
     333    my $release_name = shift;
     334    my $survey = shift;
    195335    my $verbose  = shift;
    196336
    … …  
    217357    my $magic_arg = $need_magic ? " -destreaked" : "";
    218358
     359    my $row = $rowList->[0];
     360
    219361    # all rows have the same center type
    220     my $skycenter = ! ($rowList->[0]->{COORD_MASK} & $PSTAMP_CENTER_IN_PIXELS);
     362    my $skycenter = ! ($row->{COORD_MASK} & $PSTAMP_CENTER_IN_PIXELS);
     363
     364    my $use_releasetool = 0;
     365    my $release_args;
     366    if (($req_type eq 'byexp' and $stage ne 'raw') or ($req_type eq 'byskycell' and $stage ne 'diff')) {
     367        unless (isnull($release_name) and isnull($survey)) {
     368            $use_releasetool = 1;
     369            $release_args = " -release_name $release_name" if $release_name;
     370            $release_args .= " -surveyName $survey" if $survey;
     371        }
     372    }
    221373
    222374    my $component_args;
    … …  
    249401        # use chiptool -processsedimfile. Otherwise use chiptool -listrun and then
    250402        # choose the chips containing the center pixel by calling selectComponets() below
    251         if ($component or $use_imfile_id or !$skycenter) {
    252             $command = "$chiptool -processedimfile -pstamp_order -dbname $imagedb";
    253             if ($component and $component ne 'all') {
    254                 $class_id = $component;
    255                 $component_args = " -class_id $class_id";
    256             }
    257         } else {
    258             $command = "$chiptool -listrun -pstamp_order -dbname $imagedb";
     403        if ($use_releasetool) {
     404            $command = "$releasetool -dbname $imagedb -priority_order -listrelexp $release_args";
    259405            $choose_components = 1;
    260         }
    261         $id_opt = $use_imfile_id ? "-chip_imfile_id" : "-chip_id";
     406        } else {
     407            $command = "$chiptool -pstamp_order -dbname $imagedb";
     408            if ($component or $use_imfile_id or !$skycenter) {
     409                $command .= " -processedimfile";
     410                if ($component and $component ne 'all') {
     411                    $class_id = $component;
     412                    $component_args = " -class_id $class_id";
     413                }
     414            } else {
     415                $command .= " -listrun";
     416                $choose_components = 1;
     417            }
     418            $id_opt = $use_imfile_id ? "-chip_imfile_id" : "-chip_id";
     419        }
    262420        # XXX: perhaps we should stop resolving images to this level here and do it at job run time.
    263421        # With the mdc file it has all of the information that it needs.
    … …  
    273431        $want_astrom  = 1;
    274432        $set_class_id = 1;
    275     } elsif ($stage eq "warp") {
    276         if ($component or $use_imfile_id or !$skycenter) {
    277             $command = "$warptool -warped -pstamp_order -dbname $imagedb";
    278             if ($component and $component ne 'all') {
    279                 $skycell_id = $component;
    280                 $component_args = " -skycell_id $skycell_id";
    281             }
    282         } else {
    283             $command = "$warptool -listrun -pstamp_order -dbname $imagedb";
     433    } elsif ($stage eq 'warp') {
     434        if ($use_releasetool) {
     435            $command = "$releasetool -dbname $imagedb -priority_order -listrelexp $release_args";
    284436            $choose_components = 1;
    285         }
    286         $id_opt = $use_imfile_id ? "-warp_skyfile_id" : "-warp_id";
     437        } else {
     438            $command = "$warptool -pstamp_order -dbname $imagedb";
     439            if ($component or $use_imfile_id or !$skycenter) {
     440                $command .= " -warped";
     441                if ($component and $component ne 'all') {
     442                    $skycell_id = $component;
     443                    $component_args = " -skycell_id $skycell_id";
     444                }
     445            } else {
     446                $command = " -listrun";
     447                $choose_components = 1;
     448            }
     449            $id_opt = $use_imfile_id ? "-warp_skyfile_id" : "-warp_id";
     450        }
    287451        $image_name   = "PSWARP.OUTPUT";
    288452        $mask_name    = "PSWARP.OUTPUT.MASK";
    … …  
    292456        $base_name    = "path_base"; # name of the field for the warptool output
    293457    } elsif ($stage eq "diff") {
     458        # XXX: is this path ever used for diff images anymore?
    294459        if ($component or $use_imfile_id or !$skycenter) {
    295460            $command = "$difftool -diffskyfile -pstamp_order -dbname $imagedb";
    … …  
    312477    } elsif ($stage eq "stack") {
    313478        $skycell_id = $component;
    314         $command = "$stacktool -sumskyfile -dbname $imagedb";
    315         # only consider stacks in full state.
    316         $command .= " -state full";
    317         $id_opt = "-stack_id";
     479        if ($use_releasetool) {
     480            $command = "$releasetool -listrelstack -dbname $imagedb $release_args";
     481            $base_name = 'stack_path_base';
     482        } else {
     483            $command = "$stacktool -sumskyfile -dbname $imagedb";
     484            # only consider stacks in full state.
     485            $command .= " -state full";
     486            $id_opt = "-stack_id";
     487            $base_name = 'path_base';
     488        }
    318489        $component_args = " -skycell_id $skycell_id" if $skycell_id and $skycell_id ne  'all';
    319490
    … …  
    329500        # this is wrong but gets the right answer. Need to figure out how to find the
    330501        # rule properly
    331         #$cmf_name    = "PSPHOT.OUTPUT";    # this puts .fpa. in the name
    332502        $cmf_name     = "PSWARP.OUTPUT.SOURCES";
     503        # $cmf_name    = "PSPHOT.OUTPUT";    # this puts .fpa. in the name
    333504        $psf_name    = "PPSTACK.TARGET.PSF";
    334         $base_name   = "path_base";
    335505    } else {
    336         die "Unknown IMG_TYPe supplied: $stage";
     506        die "Unknown IMG_TYPE supplied: $stage";
    337507    }
    338508
    … …  
    377547    if (!isnull($data_group)) {
    378548        $command .= " -data_group $data_group";
    379     } elsif ($req_type eq 'byskycell') {
     549    } elsif (!$use_releasetool and $req_type eq 'byskycell') {
     550        # XXX: Why am I using default data_groups only for byskycell requests?
    380551        $command .= $default_data_groups;
    381552    }
    … …  
    392563        $images = filterRuns($stage, $need_magic, $images, $inverse, $verbose);
    393564    }
     565
    394566    if ($choose_components) {
    395567        # the list of "images" is actually a list of "Runs"
    396568        # match the coords in the rows to the components in the runs
    397569        # returns an actual list of images
    398         $images = selectComponents($ipprc, $imagedb, $req_type, $stage, $rowList, $images, $verbose);
     570        if ($skycenter) {
     571            $images = selectComponents($ipprc, $imagedb, $req_type, $stage, $rowList, $images, $verbose);
     572        } else {
     573            $images = selectComponentsByName($ipprc, $imagedb, $req_type, $stage, $component, $rowList, $images, $verbose);
     574        }
    399575    } else {
    400         # put index for each of the rows into all of the the images
     576        # put index for each of the rows into all of the the selected images
    401577        setRowRefs($rowList, $images);
    402578    }
    … …  
    462638            # dquery wants these set
    463639            $out->{magicked} = 0;
    464             $out->{data_state} = $out->{state};
     640            if ($use_releasetool) {
     641                if ($image->{skycal_path_base}) {
     642                    $out->{astrom} = $image->{skycal_path_base} . ".cmf";
     643                }
     644                $out->{data_state} = $out->{state} = $out->{stack_state};
     645            } else {
     646                $out->{data_state} = $out->{state};
     647            }
    465648        }
    466649        $out->{stage_id} = $stage_id;
    … …  
    470653        my $mask_base;
    471654        if ($want_astrom) {
    472             if (! defined $out->{astrom}) {
     655            if ($selectedAstrom) {
     656                $out->{astrom} = $selectedAstrom;
     657                $out->{cam_path_base} = basename($selectedAstrom);
     658            } elsif (! defined $out->{astrom}) {
    473659                if (! find_astrometry($ipprc, $imagedb, $out, $verbose)) {
    474660                    print STDERR "failed to find astrometry for $stage $stage_id\n";
    … …  
    505691    my $byid     = shift;
    506692    my $option_mask  = shift;
    507     my $img_type = shift;
     693    my $stage = shift;
    508694    my $verbose = shift;
    509695
    … …  
    573759            # we have a stack - stack diff (well it might be stack - warp....)
    574760            # but at any rate we only handle image type diff and stack
    575             if (($img_type ne "diff") and ($img_type ne "stack")) {
    576                 print STDERR "lookup_diff: cannot lookup IMG_TYPE $img_type bydiff from a stack stack diff run\n";
     761            if (($stage ne "diff") and ($stage ne "stack")) {
     762                print STDERR "lookup_diff: cannot lookup IMG_TYPE $stage bydiff from a stack stack diff run\n";
    577763                setErrorCodes($rowList, $PSTAMP_INVALID_REQUEST);
    578764                # all images will be the same so we can stop
    … …  
    625811        }
    626812
    627         if ($img_type eq "diff") {
     813        if ($stage eq "diff") {
    628814            my @imageList = ($image);
    629815
    … …  
    656842sub lookup_bycoord {
    657843    my $ipprc      = shift;
    658     my $rowList    = shift;
     844    my $row        = shift;
    659845    my $imagedb    = shift;
    660     my $img_type   = shift;
     846    my $stage      = shift;
    661847    my $tess_id    = shift;
    662848    my $component  = shift;
    … …  
    671857    my $mjd_min = shift;
    672858    my $mjd_max = shift;
     859    my $astrom = shift;
    673860    my $verbose    = shift;
    674861
     862    my ($release_name, $survey) = get_release_info($row);
     863
     864    my $rowList = [$row];
     865
    675866    my $results = ();
    676     if (($img_type eq "raw") or ($img_type eq "chip")) {
    677 
    678         my $chips = lookup_by_cam_id_and_coords($ipprc, $imagedb, $img_type,
    679             $ra, $dec, $need_magic, $dateobs_begin, $dateobs_end, $filter, $data_group, $verbose);
     867    if (($stage eq "raw") or ($stage eq "chip")) {
     868
     869        my $chips = lookup_by_cam_id_and_coords($ipprc, $imagedb, $stage,
     870            $ra, $dec, $need_magic, $dateobs_begin, $dateobs_end, $filter, $data_group, $verbose, $release_name, $survey, $row->{FWHM_MIN}, $row->{FWHM_MAX});
    680871
    681872        if (!$chips or scalar @$chips == 0) {
    … …  
    684875            foreach my $chip (@$chips) {
    685876                next if $component and ($chip->{component} ne $component);
    686                 my $these_results = lookup($ipprc, $rowList, $imagedb, "byid", $img_type, $chip->{id},
     877                my $these_results = lookup($ipprc, $rowList, $imagedb, "byid", $stage, $chip->{id},
    687878                    $tess_id, $chip->{component}, $need_magic,
    688                     $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max, $verbose);
     879                    $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max,
     880                    $chip->{astrom}, undef, undef,
     881                    $verbose);
    689882
    690883                next if !$these_results;
    … …  
    695888    } else {
    696889        # this should have been checked elsewhere
    697         die "unexpected image type $img_type" if ($img_type ne "warp")
    698                                               and ($img_type ne "stack") and ($img_type ne "diff");
     890        die "unexpected image type $stage" if ($stage ne "warp")
     891                                              and ($stage ne "stack") and ($stage ne "diff");
    699892
    700893        my $skycells = lookup_skycell_by_coords($ipprc, $tess_id, $component, $ra, $dec, $verbose);
    … …  
    704897        } else {
    705898            foreach my $skycell (@$skycells) {
    706                 my $these_results = lookup($ipprc, $rowList, $imagedb, "byskycell", $img_type, undef,
     899                my $these_results = lookup($ipprc, $rowList, $imagedb, "byskycell", $stage, undef,
    707900                    $skycell->{tess_id}, $skycell->{component}, $need_magic,
    708                     $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max, $verbose);
     901                    $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $mjd_min, $mjd_max,
     902                    undef, $release_name, $survey,
     903                    $verbose);
    709904
    710905                next if !$these_results;
    … …  
    722917
    723918sub lookup_by_cam_id_and_coords {
    724     my $ipprc      = shift;
    725     my $imagedb   = shift;
    726     my $img_type   = shift;
    727     my $ra         = shift;
    728     my $dec        = shift;
    729     my $need_magic = shift;
     919    my $ipprc       = shift;
     920    my $imagedb     = shift;
     921    my $stage       = shift;
     922    my $ra          = shift;
     923    my $dec         = shift;
     924    my $need_magic  = shift;
    730925    my $dateobs_begin  = shift;
    731926    my $dateobs_end = shift;
    … …  
    733928    my $data_group = shift;
    734929    my $verbose    = shift;
    735 
    736     my $camruns;
    737 
    738     {
    739         my $search_radius = 1.6; # XXX: this should be camera specific
    740 
     930    my $release_name = shift;
     931    my $survey      = shift;
     932    my $fwhm_min    = shift;
     933    my $fwhm_max    = shift;
     934
     935    my $search_radius = 1.6; # XXX: this should be camera specific
     936
     937    my $command;
     938    my $using_camtool = 0;
     939    if ($release_name or $survey) {
     940        $command = "$releasetool -dbname $imagedb -listrelexp";
     941        if (!isnull($survey)) {
     942            $command .= " -survey_name $survey";
     943        }
     944        if (!isnull($release_name)) {
     945            $command .= " -release_name $release_name";
     946        } else {
     947            $command .= " -priority_order";
     948        }
     949        if ($fwhm_min != 0) {
     950            $command .= " -fwhm_min $fwhm_min";
     951        }
     952        if ($fwhm_max != 0) {
     953            $command .= " -fwhm_max $fwhm_max";
     954        }
     955    } else {
     956        $using_camtool = 1;
    741957        my $command = "$camtool -dbname $imagedb -processedexp -pstamp_order";
    742            $command .= " -ra $ra -decl $dec -radius $search_radius";
    743            $command .= " -dateobs_begin $dateobs_begin" if $dateobs_begin;
    744            $command .= " -dateobs_end   $dateobs_end"   if $dateobs_end  ;
    745            $command .= " -filter $filter" if $filter;
    746958           # NOTE: we are applying the data_group to the camera run.
    747959           # If we're looking for chip stage images there is no guarentee that
    … …  
    755967           }
    756968           $command .= " -destreaked" if $need_magic;
    757 
    758         # run the tool and parse the output
    759         $camruns = runToolAndParse($command, $verbose);
    760     }
    761     if (!$camruns) {
     969    }
     970    $command .= " -ra $ra -decl $dec -radius $search_radius";
     971    $command .= " -dateobs_begin $dateobs_begin" if $dateobs_begin;
     972    $command .= " -dateobs_end   $dateobs_end"   if $dateobs_end  ;
     973    $command .= " -filter $filter" if $filter;
     974
     975    # run the tool and parse the output
     976    my $results = runToolAndParse($command, $verbose);
     977    if (!$results) {
    762978        return undef;
    763979    }
    764980    my $components;
    765981    my $last_exp_id = 0;
    766     foreach my $camRun (@$camruns) {
    767         my $cam_id = $camRun->{cam_id};
    768         my $exp_id = $camRun->{exp_id};
    769 
     982    foreach my $result (@$results) {
     983        my $cam_id = $result->{cam_id};
     984        my $exp_id = $result->{exp_id};
     985
     986        # go on if we already have a result for this exposure
    770987        next if $exp_id eq $last_exp_id;
    771988
    772         next if $camRun->{quality};
    773         next if $camRun->{fault};
    774 
    775         updateCamRunCache($camRun);
     989        next if $result->{quality};
     990
     991        if ($using_camtool) {
     992            next if $result->{fault};
     993        } else {
     994            $result->{path_base} = $result->{cam_path_base};
     995        }
     996        updateCamRunCache($result);
    776997
    777998        $last_exp_id = $exp_id;
    778999
    7791000        # XXX Use file rule
    780         my $astrom = $camRun->{path_base} . ".smf";
     1001        my $astrom = $result->{path_base} . ".smf";
    7811002        my $astrom_resolved = $ipprc->file_resolve($astrom);
    7821003        next if !$astrom_resolved;
    … …  
    8321053        }
    8331054
    834         print "cam_id $cam_id exp_id $camRun->{exp_id} chip_id $camRun->{chip_id} $class_id\n";
     1055        print "cam_id $cam_id exp_id $result->{exp_id} chip_id $result->{chip_id} $class_id\n";
    8351056
    8361057        # build the hash to return
    … …  
    8401061        # problem
    8411062        my $comp = {
    842             exp_id    => $camRun->{exp_id},
    843             exp_name  => $camRun->{exp_name},
    844             chip_id   => $camRun->{chip_id},
    845             cam_id    => $camRun->{cam_id},
     1063            exp_id    => $result->{exp_id},
     1064            exp_name  => $result->{exp_name},
     1065            chip_id   => $result->{chip_id},
     1066            cam_id    => $result->{cam_id},
    8461067            class_id  => $class_id,
    847             component => $class_id
     1068            component => $class_id,
     1069            astrom    => $astrom
    8481070        };
    849         if ($img_type eq "chip") {
    850             $comp->{id} = $camRun->{chip_id};
    851             $comp->{state} = $camRun->{chip_state};
    852             $comp->{magicked} = $camRun->{chip_magicked};
    853         } else {
    854             $comp->{id} = $camRun->{exp_id};
     1071        if ($stage eq "chip") {
     1072            $comp->{id} = $result->{chip_id};
     1073            $comp->{state} = $result->{chip_state};
     1074            $comp->{magicked} = 0;
     1075        } else {
     1076            $comp->{id} = $result->{exp_id};
    8551077            $comp->{state} = 'full';
    856             $comp->{magicked} = $camRun->{raw_magicked};
     1078            $comp->{magicked} = $0;
    8571079        }
    8581080        push @$components, $comp;
    … …  
    12811503}
    12821504
     1505sub selectComponentsByName {
     1506    my $ipprc = shift;
     1507    my $imagedb = shift;
     1508    my $req_type = shift;
     1509    my $stage  = shift;
     1510    my $component  = shift;
     1511    my $rowList = shift;
     1512    my $runList = shift;
     1513    my $verbose = shift;
     1514    my $results = [];
     1515
     1516    $component = "" if $component and lc($component) eq 'all';
     1517
     1518    # all runs match all rows so they can share a common row_index
     1519    # XXX: I'm not sure we ever actually get here with more than one
     1520    # row
     1521    my $numRows = scalar @$rowList;
     1522    my $row_index = [];
     1523    for (my $i=0; $i < $numRows; $i++) {
     1524        push @$row_index, $i;
     1525    }
     1526   
     1527    if (($req_type eq "byid") or ($req_type eq "byexp")) {
     1528        my ($last_tess_id, $tess_dir_abs, $astrom_file) = ("", "", "");
     1529        foreach my $run (@$runList) {
     1530            # now find the images for this run
     1531            #foreach my $c (keys %components) {
     1532            my $command;
     1533            my $stage_id;
     1534            if ($stage eq 'raw') {
     1535                $stage_id = $run->{exp_id};
     1536                $command = "$regtool -processedimfile -exp_id $stage_id";
     1537                $command .= " -class_id $component" if $component;
     1538            } elsif ($stage eq 'chip') {
     1539                $stage_id = $run->{chip_id};
     1540                $command = "$chiptool -processedimfile -chip_id $stage_id";
     1541                $command .= " -class_id $component" if $component;
     1542            } elsif ($stage eq 'warp') {
     1543                $stage_id = $run->{warp_id};
     1544                $command = "$warptool -warped -warp_id $stage_id";
     1545                $command .= " -skycell_id $component" if $component;
     1546            }
     1547            $command .= " -dbname $imagedb";
     1548            my $images = runToolAndParse($command, $verbose);
     1549            if (!defined $images) {
     1550                print "No  $component found for $stage ${stage}_id $stage_id\n";
     1551                next;
     1552            }
     1553            foreach my $image (@$images) {
     1554                $image->{row_index} = $row_index;
     1555                if (($stage eq "raw") or ($stage eq 'chip')) {
     1556                    $image->{cam_id} = $run->{cam_id};
     1557                    $image->{cam_path_base} = $run->{cam_path_base};
     1558                }
     1559                push @$results, $image;
     1560            }
     1561        }
     1562    } else {
     1563        &my_die ("selectComponentsByName not supported for REQ_TYPE: $req_type\n", $PS_EXIT_PROG_ERROR);
     1564    }
     1565    return $results;
     1566}
     1567
    12831568sub filterRuns {
    12841569    my $stage      = shift;
    … …  
    14071692    $dvoImagesAtCoords = can_run('dvoImagesAtCoords') or (warn "Can't find dvoImagesAtCoords"
    14081693                                                                and $missing_tools = 1);
     1694    $releasetool = can_run('releasetool') or (warn "Can't find releasetool"
     1695                                                                and $missing_tools = 1);
    14091696    $whichimage = can_run('whichimage') or (warn "Can't find whichimage" and $missing_tools = 1);
    14101697    $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
    … …  
    14621749}
    14631750
     1751sub get_release_info {
     1752    my $row = shift;
     1753
     1754    my $survey;
     1755    my $release_name = $row->{IPP_RELEASE};
     1756    if (isnull($release_name)) {
     1757        $release_name = "";
     1758        # no release check for survey
     1759        $survey = $row->{SURVEY_NAME};
     1760    } else {
     1761        $survey = "";
     1762    }
     1763
     1764    return ($release_name, $survey);
     1765}
     1766
    14641767sub my_die
    14651768{
  • branches/eam_branches/ipp-20130307/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm

    r34448 r35413  
    5252                    $PSTAMP_NO_OVERLAP
    5353                    $PSTAMP_NOT_AUTHORIZED
     54                    $PSTAMP_UNKNOWN_PROJECT
    5455                    );
    5556our %EXPORT_TAGS = (standard => [@EXPORT_OK]);
    … …  
    101102our $PSTAMP_NO_OVERLAP       = 28;
    102103our $PSTAMP_NOT_AUTHORIZED   = 29;
     104our $PSTAMP_UNKNOWN_PROJECT  = 22;
    103105
    104106
    … …  
    167169    my $fields_output;
    168170    {
    169         my $command = "echo $request_file_name | $fields -x 0 EXTNAME EXTVER REQ_NAME ACTION USERNAME EMAIL";
     171        my $command = "echo $request_file_name | $fields -x 0 EXTNAME EXTVER REQ_NAME ACTION EMAIL";
    170172        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    171173            run(command => $command, verbose => $verbose);
    … …  
    187189    if ($extver > 1) {
    188190        $header{ACTION} = $action;
    189         $header{USER} = $username;
    190191        $header{EMAIL} = $email;
    191192    } else {
    192193        $header{ACTION} = $action = "PROCESS";
    193         $header{USERNAME} = 'null';
    194194        $header{EMAIL} = 'null';
    195195    }
    196196
    197     if ($action eq "LIST") {
    198         return (\%header, undef);
    199     } elsif ($action ne "PROCESS") {
    200         die "unexpected request ACTION found: $action in $request_file_name";
     197    if ($action ne "PROCESS" and $action ne 'PREVIEW') {
     198        die "\nunexpected request ACTION found: $action in $request_file_name";
    201199    }
    202200
  • branches/eam_branches/ipp-20130307/dbconfig/cam.md

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/dbconfig/changes.txt

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ippMonitor

  • branches/eam_branches/ipp-20130307/ippMonitor/raw/czartool_getplot.php

    r35200 r35413  
    3838else if ($type=="hp_s")
    3939$filePath = "$path/heathers_plots/skycal.png";
    40 
     40else if ($type=="hp_cm")
     41$filePath = "$path/heathers_plots/cam_merged.png";
     42else if ($type=="hp_sm")
     43$filePath = "$path/heathers_plots/skycal_merged.png";
    4144
    4245$file = fopen ($filePath, "r");
  • branches/eam_branches/ipp-20130307/ippMonitor/raw/heathers_plot.php

    r35350 r35413  
    1010menu('ipp.czar.dat', 'useful tools for the czar', 'ipp.css', $ID['link'], $ID['proj']);
    1111
    12 echo "These images are generated every day at 7:00 HST (17:00 GMT)\n";
     12echo "These images are generated every day at 7:00 HST (17:00 GMT) on ipp@ippc11\n";
    1313// document body
    1414echo "<table>\n";
    … …  
    2323echo "</tr>\n";
    2424
     25echo "<tr>\n";
     26echo "<td>Camera Merged</td>\n";
     27echo "<td>SkyCal Merged</td>\n";
     28echo "</tr>\n";
     29
     30echo "<tr>\n";
     31echo "<td><img src=\"czartool_getplot.php?type=hp_cm\"/></td>\n";
     32echo "<td><img src=\"czartool_getplot.php?type=hp_sm\"/></td>\n";
     33echo "</tr>\n";
     34
    2535echo "</table>\n";
    2636
  • branches/eam_branches/ipp-20130307/ippTasks

  • branches/eam_branches/ipp-20130307/ippTasks/release.pro

    r35350 r35413  
    129129    host anyhost
    130130
    131     $run = relgroup_exp_list.pl --group_id $GROUP_ID --group_type $GROUP_TYPE --release_name $RELEASE_NAME
     131    $run = relgroup_exp_list.pl --group_id $GROUP_ID --group_type $GROUP_TYPE --release_name $RELEASE_NAME --rebuild
    132132    if ("$GROUP_TYPE" == "lap")
    133133        $run = $run --lap_id $LAP_ID
  • branches/eam_branches/ipp-20130307/ippTasks/survey.pro

    r35350 r35413  
    1919 book create SURVEY_SKYCAL
    2020 book create SURVEY_LAPGROUP
     21 book create SURVEY_RELEXP
    2122 $haveSurveyBooks = TRUE
    2223end
    … …  
    3536$SURVEY_SKYCAL_DB = 0
    3637$SURVEY_LAPGROUP_DB = 0
     38$SURVEY_RELEXP_DB = 0
    3739$SURVEY_STATICSKYSINGLE_DB = 0
    3840$SURVEY_EXEC = 120
    … …  
    8385    active true
    8486  end
     87  task survey.relexp
     88    active true
     89  end
    8590end
    8691
    … …  
    126131  end
    127132  task survey.lapgroup
     133    active false
     134  end
     135  task survey.relexp
    128136    active false
    129137  end
    … …  
    533541  end
    534542  book listbook SURVEY_LAPGROUP
     543end
     544
     545macro survey.add.relexp
     546  if ($0 != 3)
     547    echo "USAGE: survey.add.relexp (label) (releasename)"
     548    break
     549  end
     550  book newpage SURVEY_RELEXP $1
     551  book setword SURVEY_RELEXP $1 LABEL $1
     552  book setword SURVEY_RELEXP $1 RELEASE_NAME $2
     553  book setword SURVEY_RELEXP $1 STATE PENDING
     554end
     555
     556macro survey.del.relexp
     557  if ($0 != 2)
     558    echo "USAGE: survey.del.relexp (label)"
     559    break
     560  end
     561  book delpage SURVEY_RELEXP $1
     562end
     563
     564macro survey.show.relexp
     565  if ($0 != 1)
     566    echo "USAGE: survey.show.relexp"
     567    break
     568  end
     569  book listbook SURVEY_RELEXP
    535570end
    536571
    … …  
    16261661
    16271662      # Select different database
    1628       $SURVEY_LAPGROUP ++
    1629       if ($SURVEY_LAPGROUP >= $DB:n) set SURVEY_LAPGROUP = 0
     1663      $SURVEY_LAPGROUP_DB ++
     1664      if ($SURVEY_LAPGROUP_DB >= $DB:n) set SURVEY_LAPGROUP_DB = 0
    16301665    end
    16311666
    … …  
    16331668    book getword SURVEY_LAPGROUP $label SEQ_ID -var SEQ_ID
    16341669
    1635     # For now the list of filters
     1670    # For now the list of filters is hardcoded here
    16361671    $run = laptool -definegroup -seq_id $SEQ_ID -set_label $label -filter g.00000 -filter r.00000 -filter i.00000 -filter z.00000 -filter y.00000
    16371672
    … …  
    16661701  end
    16671702end
     1703
     1704task survey.relexp
     1705  host local
     1706 
     1707  periods      -poll $SURVEY_POLL
     1708  periods      -exec $SURVEY_EXEC
     1709  periods      -timeout $SURVEY_TIMEOUT
     1710  npending     1
     1711
     1712  stdout $LOGDIR/survey.relexp.log
     1713  stderr $LOGDIR/survey.relexp.log
     1714
     1715  task.exec
     1716    book npages SURVEY_RELEXP -var N
     1717    if ($N == 0)
     1718#      echo "No labels for processing"
     1719      break
     1720    endif
     1721
     1722    book getpage SURVEY_RELEXP 0 -var label -key STATE NEW
     1723    if ("$label" == "NULL")
     1724      # All labels have been done --- reset
     1725#      echo "Resetting labels"
     1726      for i 0 $N
     1727        book getpage SURVEY_RELEXP $i -var label
     1728        book setword SURVEY_RELEXP $label STATE NEW
     1729      end
     1730      book getpage SURVEY_RELEXP 0 -var label -key STATE NEW
     1731
     1732      # Select different database
     1733      $SURVEY_RELEXP_DB ++
     1734      if ($SURVEY_RELEXP_DB >= $DB:n) set SURVEY_RELEXP_DB = 0
     1735    end
     1736
     1737    book setword SURVEY_RELEXP $label STATE DONE
     1738    book getword SURVEY_RELEXP $label RELEASE_NAME -var RELEASE_NAME
     1739
     1740    $run = releasetool -definerelexp -label $label -release_name $RELEASE_NAME -set_state processed
     1741
     1742    if ($DB:n == 0)
     1743      option DEFAULT
     1744    else
     1745      $run = $run -dbname $DB:$SURVEY_RELEXP_DB
     1746      option $DB:$SURVEY_RELEXP_DB
     1747    end
     1748   
     1749    # echo $run
     1750    command $run
     1751  end
     1752
     1753  # success
     1754  task.exit    0
     1755#    echo "Success"
     1756  end
     1757
     1758  # locked list
     1759  task.exit    default
     1760    showcommand failure
     1761  end
     1762
     1763  task.exit    crash
     1764    showcommand crash
     1765  end
     1766
     1767  # operation times out?
     1768  task.exit    timeout
     1769    showcommand timeout
     1770  end
     1771end
  • branches/eam_branches/ipp-20130307/ippToPsps

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ippconfig

  • branches/eam_branches/ipp-20130307/ippconfig/dvo.photcodes

    r35209 r35413  
    165165  3004  SYNTH.z              ref   0.000  0.000 0.000     -     - 0.0000     0     4     nan 0.000 2.000  0.600   0x0000 0x0000  0x0000 0x0000
    166166  3005  SYNTH.y              ref   0.000  0.000 0.000     -     - 0.0000     0     5     nan 0.000 2.000  0.600   0x0000 0x0000  0x0000 0x0000
     167  3006  SYNTH.w              ref   0.000  0.000 0.000     -     - 0.0000     0     9     nan 0.000 2.000  0.600   0x0000 0x0000  0x0000 0x0000
    167168
    168169  100   MEGACAM.u.00         dep  25.280 -0.350 0.000     -     - 0.0000     0     -   0.000 0.000 1.000  0.000   0x0000 0x3888  0x0000 0x0000
    … …  
    836837  10475 GPC1.y.XY75          dep  23.320 -0.073 0.000     -     - 0.0000     0     5   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    837838  10476 GPC1.y.XY76          dep  23.320 -0.073 0.000     -     - 0.0000     0     5   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    838   10501 GPC1.w.XY01          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    839   10502 GPC1.w.XY02          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    840   10503 GPC1.w.XY03          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    841   10504 GPC1.w.XY04          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    842   10505 GPC1.w.XY05          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    843   10506 GPC1.w.XY06          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    844   10510 GPC1.w.XY10          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    845   10511 GPC1.w.XY11          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    846   10512 GPC1.w.XY12          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    847   10513 GPC1.w.XY13          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    848   10514 GPC1.w.XY14          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    849   10515 GPC1.w.XY15          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    850   10516 GPC1.w.XY16          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    851   10517 GPC1.w.XY17          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    852   10520 GPC1.w.XY20          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    853   10521 GPC1.w.XY21          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    854   10522 GPC1.w.XY22          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    855   10523 GPC1.w.XY23          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    856   10524 GPC1.w.XY24          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    857   10525 GPC1.w.XY25          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    858   10526 GPC1.w.XY26          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    859   10527 GPC1.w.XY27          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    860   10530 GPC1.w.XY30          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    861   10531 GPC1.w.XY31          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    862   10532 GPC1.w.XY32          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    863   10533 GPC1.w.XY33          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    864   10534 GPC1.w.XY34          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    865   10535 GPC1.w.XY35          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    866   10536 GPC1.w.XY36          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    867   10537 GPC1.w.XY37          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    868   10540 GPC1.w.XY40          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    869   10541 GPC1.w.XY41          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    870   10542 GPC1.w.XY42          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    871   10543 GPC1.w.XY43          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    872   10544 GPC1.w.XY44          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    873   10545 GPC1.w.XY45          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    874   10546 GPC1.w.XY46          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    875   10547 GPC1.w.XY47          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    876   10550 GPC1.w.XY50          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    877   10551 GPC1.w.XY51          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    878   10552 GPC1.w.XY52          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    879   10553 GPC1.w.XY53          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    880   10554 GPC1.w.XY54          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    881   10555 GPC1.w.XY55          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    882   10556 GPC1.w.XY56          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    883   10557 GPC1.w.XY57          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    884   10560 GPC1.w.XY60          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    885   10561 GPC1.w.XY61          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    886   10562 GPC1.w.XY62          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    887   10563 GPC1.w.XY63          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    888   10564 GPC1.w.XY64          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    889   10565 GPC1.w.XY65          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    890   10566 GPC1.w.XY66          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    891   10567 GPC1.w.XY67          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    892   10571 GPC1.w.XY71          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    893   10572 GPC1.w.XY72          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    894   10573 GPC1.w.XY73          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    895   10574 GPC1.w.XY74          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    896   10575 GPC1.w.XY75          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    897   10576 GPC1.w.XY76          dep  25.000  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     839  10501 GPC1.w.XY01          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     840  10502 GPC1.w.XY02          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     841  10503 GPC1.w.XY03          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     842  10504 GPC1.w.XY04          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     843  10505 GPC1.w.XY05          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     844  10506 GPC1.w.XY06          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     845  10510 GPC1.w.XY10          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     846  10511 GPC1.w.XY11          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     847  10512 GPC1.w.XY12          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     848  10513 GPC1.w.XY13          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     849  10514 GPC1.w.XY14          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     850  10515 GPC1.w.XY15          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     851  10516 GPC1.w.XY16          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     852  10517 GPC1.w.XY17          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     853  10520 GPC1.w.XY20          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     854  10521 GPC1.w.XY21          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     855  10522 GPC1.w.XY22          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     856  10523 GPC1.w.XY23          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     857  10524 GPC1.w.XY24          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     858  10525 GPC1.w.XY25          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     859  10526 GPC1.w.XY26          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     860  10527 GPC1.w.XY27          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     861  10530 GPC1.w.XY30          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     862  10531 GPC1.w.XY31          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     863  10532 GPC1.w.XY32          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     864  10533 GPC1.w.XY33          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     865  10534 GPC1.w.XY34          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     866  10535 GPC1.w.XY35          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     867  10536 GPC1.w.XY36          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     868  10537 GPC1.w.XY37          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     869  10540 GPC1.w.XY40          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     870  10541 GPC1.w.XY41          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     871  10542 GPC1.w.XY42          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     872  10543 GPC1.w.XY43          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     873  10544 GPC1.w.XY44          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     874  10545 GPC1.w.XY45          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     875  10546 GPC1.w.XY46          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     876  10547 GPC1.w.XY47          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     877  10550 GPC1.w.XY50          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     878  10551 GPC1.w.XY51          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     879  10552 GPC1.w.XY52          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     880  10553 GPC1.w.XY53          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     881  10554 GPC1.w.XY54          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     882  10555 GPC1.w.XY55          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     883  10556 GPC1.w.XY56          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     884  10557 GPC1.w.XY57          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     885  10560 GPC1.w.XY60          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     886  10561 GPC1.w.XY61          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     887  10562 GPC1.w.XY62          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     888  10563 GPC1.w.XY63          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     889  10564 GPC1.w.XY64          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     890  10565 GPC1.w.XY65          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     891  10566 GPC1.w.XY66          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     892  10567 GPC1.w.XY67          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     893  10571 GPC1.w.XY71          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     894  10572 GPC1.w.XY72          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     895  10573 GPC1.w.XY73          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     896  10574 GPC1.w.XY74          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     897  10575 GPC1.w.XY75          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
     898  10576 GPC1.w.XY76          dep  26.060  0.000 0.000     -     - 0.0000     0     9   0.015 0.000 1.000  0.000   0x0000 0x0000  0xe0440130 0x1003bc88
    898899  11000 GPC1.g.SkyChip       dep  25.000  0.000 0.000     -     - 0.0000     0     1   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000
    899900  11100 GPC1.r.SkyChip       dep  25.000  0.000 0.000     -     - 0.0000     0     2   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000
  • branches/eam_branches/ipp-20130307/ippconfig/gpc1/ppStack.config

    r35350 r35413  
    11PSF.MODEL       STR     PS_MODEL_PS1_V1 # Model for PSF generation
     2BACKGROUND.MODEL BOOL   F
    23
    34ZP.AIRMASS      METADATA                # Airmass terms by filter
    … …  
    2425    PSF.INPUT.MAX           F32   6.0   # never really want >6 pixels in refstack
    2526    PSF.INPUT.CLIP.NSIGMA   F32   1.0   # sample typically on rising side of distribution (set even smaller?)
     27    PSF.INPUT.THRESH        F32   0.0
     28    PSF.INPUT.ASYMMETRY     F32   0.0
    2629END
    2730
    … …  
    3033    OUTPUT.LOGFLUX          BOOL  FALSE
    3134    OUTPUT.REPLICATE        BOOL  TRUE
    32     PSF.INPUT.MAX           F32   7.5
     35    PSF.INPUT.MAX           F32   10.0
    3336    PSF.INPUT.CLIP.NSIGMA   F32   1.5
     37    PSF.INPUT.THRESH        F32   5.0
     38    PSF.INPUT.ASYMMETRY     F32   0.2
    3439END
    3540
    … …  
    4045    OUTPUT.NOCOMP          BOOL  TRUE
    4146    OUTPUT.LOGFLUX         BOOL  FALSE
    42     PSF.INPUT.MAX          F32   7.5    # since not convolved limit, relax/tune?
     47    PSF.INPUT.MAX          F32   10.0    # since not convolved limit, relax/tune?
    4348    PSF.INPUT.CLIP.NSIGMA  F32   1.5
     49    PSF.INPUT.THRESH        F32   5.0
     50    PSF.INPUT.ASYMMETRY     F32   0.2
    4451END
    4552
    … …  
    5259    OUTPUT.NOCOMP           BOOL  FALSE
    5360    OUTPUT.LOGFLUX          BOOL  TRUE
    54     PSF.INPUT.MAX           F32   7.5   # input cut more restrictive now 12->7.5 pix, limit target PSF in convolved stacks
     61    PSF.INPUT.MAX           F32   10.0  # input cut more restrictive now 12->10 pix, limit target PSF in convolved stacks
    5562    PSF.INPUT.CLIP.NSIGMA   F32   1.5   # additional cut if majority of inputs much smaller than INPUT.MAX
     63    PSF.INPUT.THRESH        F32   5.0
     64    PSF.INPUT.ASYMMETRY     F32   0.2
    5665END
    5766
  • branches/eam_branches/ipp-20130307/ippconfig/gpc1/psphot.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ippconfig/isp/dvo.config

    r29403 r35413  
    11
    22# location of DVO database tables
    3 CATDIR                  /data/alala/eugene/isp/catdir
     3#CATDIR                 /data/alala/eugene/isp/catdir
     4MOSAICNAME              ISP-APOGEE
    45
    56# keywords used by DVO to interpret the headers
  • branches/eam_branches/ipp-20130307/ippconfig/isp/ppImage.config

    r31620 r35413  
    623623  END   
    624624END
     625
     626PPIMAGE_BKGCONT    METADATA
     627  OVERSCAN         BOOL    FALSE           # Overscan subtraction
     628  NONLIN           BOOL    FALSE           # Non-linearity correction; not implemented
     629  BIAS             BOOL    FALSE           # Bias subtraction
     630  DARK             BOOL    FALSE           # Dark subtraction
     631  SHUTTER          BOOL    FALSE           # Shutter correction
     632  FLAT             BOOL    FALSE           # Flat-field normalisation
     633  MASK             BOOL    FALSE           # Mask bad pixels
     634  MASK.BUILD       BOOL    FALSE           # Build internal mask?
     635  FRINGE           BOOL    FALSE           # Fringe subtraction
     636  PHOTOM           BOOL    FALSE           # Source identification and photometry
     637  ASTROM.CHIP      BOOL    FALSE           # Astrometry per chip?
     638  ASTROM.MOSAIC    BOOL    FALSE           # Astrometry for mosaic?
     639  BASE.FITS        BOOL    FALSE           # Save base image?
     640  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
     641  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
     642  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image?
     643  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image?
     644  CHIP.VARIANCE.FITS BOOL    FALSE           # Save chip-mosaic-ed image?
     645  BIN1.FITS        BOOL    FALSE           # Save 1st binned chip image?
     646  BIN2.FITS        BOOL    FALSE           # Save 2nd binned chip image?
     647  BIN1.JPEG        BOOL    FALSE           # Save 1st binned jpeg?
     648  BIN2.JPEG        BOOL    FALSE           # Save 2nd binned jpeg?
     649  BIN1.XBIN        S32     1               # Image is already binned
     650  BIN1.YBIN        S32     1               # Image is already binned
     651  BIN2.XBIN        S32     1               # Image is already binned
     652  BIN2.YBIN        S32     1               # Image is already binned
     653  MASK.SATURATED   BOOL    FALSE           # DO NOT Mask the saturated pixels
     654  MASK.LOW         BOOL    FALSE           # DO NOT Mask the saturated pixels
     655  BACKGROUND.CONTINUITY BOOL FALSE
     656  PATTERN.CONTINUITY.WIDTH S32 2
     657END
     658
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/filerules-mef.mdc

    r35081 r35413  
    118118PSWARP.VARIANCE         INPUT    @FILES        CHIP       VARIANCE
    119119PSWARP.MASK             INPUT    @FILES        CHIP       MASK
    120 PSWARP.SKYCELL          INPUT    @FILES        CHIP       IMAGE
    121 PSWARP.ASTROM           INPUT    @FILES        CHIP       CMF
    122 PSWARP.BKGMODEL           INPUT    @FILES        CHIP       IMAGE
     120PSWARP.SKYCELL          INPUT    @FILES        CHIP       WCS
     121PSWARP.ASTROM           INPUT    @FILES        CHIP       WCS
     122PSWARP.BKGMODEL         INPUT    @FILES        CHIP       IMAGE
    123123
    124124## files used by ppsub
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/filerules-simple.mdc

    r35081 r35413  
    8888PSWARP.VARIANCE           INPUT    @FILES        FPA        VARIANCE
    8989PSWARP.MASK               INPUT    @FILES        FPA        MASK
    90 PSWARP.SKYCELL            INPUT    @FILES        FPA        IMAGE     
    91 PSWARP.ASTROM             INPUT    @FILES        FPA        CMF
     90PSWARP.SKYCELL            INPUT    @FILES        FPA        WCS
     91PSWARP.ASTROM             INPUT    @FILES        FPA        WCS
    9292PSWARP.BKGMODEL           INPUT    @FILES        CHIP       IMAGE
    9393
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/filerules-split.mdc

    r35116 r35413  
    106106PSWARP.VARIANCE           INPUT    @FILES        CHIP       VARIANCE
    107107PSWARP.MASK               INPUT    @FILES        CHIP       MASK
    108 PSWARP.SKYCELL            INPUT    @FILES        FPA        IMAGE
    109 PSWARP.ASTROM             INPUT    @FILES        CHIP       CMF
     108PSWARP.SKYCELL            INPUT    @FILES        CHIP       WCS
     109PSWARP.ASTROM             INPUT    @FILES        CHIP       WCS
     110#PSWARP.SKYCELL            INPUT    @FILES        CHIP       CMF
     111#PSWARP.ASTROM             INPUT    @FILES        CHIP       CMF
    110112PSWARP.BKGMODEL           INPUT    @FILES        CHIP       IMAGE
    111113                         
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/ppStack.config

    r35350 r35413  
    9292PSF.INPUT.MAX           F32  NAN
    9393PSF.INPUT.CLIP.NSIGMA   F32  NAN
     94PSF.INPUT.THRESH        F32  NAN
     95PSF.INPUT.ASYMMETRY     F32  NAN
    9496
    9597TEMP.IMAGE      STR     conv.im.fits    # Suffix for temporary convolved images
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/ppSub.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/psphot.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ippconfig/recipes/reductionClasses.mdc

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ppImage/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/ppImage/src/ppImageParseCamera.c

    r35081 r35413  
    2222    ppImageOptions *options = ppImageOptionsParse(config);
    2323
    24     // parse the header to extract out whether this OTA has video cells.
    25     // CZW: 2012-05-01 I'm somewhat ashamed of what needs to be done to get to the header. There has to be a simpler way, right?
    26 /*     pmFPAview *view = pmFPAviewAlloc(0);// View for level of interest */
    27 /*     pmChip *chip;                       // Chip from FPA */
    28 /*     while ((chip = pmFPAviewNextChip(view, input->fpa, 1)) != NULL) { */
    29 /*       if (!chip->process || !chip->file_exists) { */
    30 /*      continue; */
    31 /*       } */
    32 /* /\*       if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { *\/ */
    33 /* /\*  continue; *\/ */
    34 /* /\*       } *\/ */
    35 /*       psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); */
    36 /*       if (psMetadataLookupStr(NULL,chip->hdu->header,"CELLMODE")) { */
    37 /*      psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); */
    38 /*      char *Vptr = strchr(psMetadataLookupStr(NULL,chip->hdu->header,"CELLMODE"),'V'); */
    39 /*      if (Vptr) { */
    40 /*        options->hasVideo = true; */
    41 /*        psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); */
    42 /*      } */
    43 /*       } */
    44 /*     } */
    45 /*     pmFPAviewReset(view); */
    46 /*     psFree(view); */
    47    
    4824    // the following are defined from the argument list, if given,
    4925    // otherwise they revert to the config information
  • branches/eam_branches/ipp-20130307/ppStack/src/ppStackMatch.c

    r34089 r35413  
    88// #define TESTING                         // Enable debugging output
    99// #define TESTING_REUSE_CONV           // Enable debugging for re-using convolved outputs from previous run
     10
     11// #define TESTING_CZW
    1012
    1113#ifdef TESTING_REUSE_CONV
    … …  
    264266            // Add the background into the target image
    265267            psImage *bgImage = stackBackgroundModel(readout, config); // Image of background
    266             psBinaryOp(fake->image, fake->image, "+", bgImage);
     268            psBinaryOp(fake->image, fake->image, "+", bgImage);
    267269            psFree(bgImage);
    268270#endif
    269271
    270 #ifdef TESTING
     272#ifdef TESTING_CZW
    271273            {
    272274                pmHDU *hdu = pmHDUFromCell(readout->parent);
    273275                psString name = NULL;
    274                 psStringAppend(&name, "fake_%03d.fits", index);
     276                psStringAppend(&name, "/local/tmp/fake_%03d.fits", index);
    275277                pmStackVisualPlotTestImage(fake->image, name);
    276278                psFits *fits = psFitsOpen(name, "w");
    … …  
    282284                pmHDU *hdu = pmHDUFromCell(readout->parent);
    283285                psString name = NULL;
    284                 psStringAppend(&name, "real_%03d.fits", index);
     286                psStringAppend(&name, "/local/tmp/real_%03d.fits", index);
    285287                pmStackVisualPlotTestImage(readout->image, name);
    286288                psFits *fits = psFitsOpen(name, "w");
    287289                psFree(name);
    288290                psFitsWriteImage(fits, hdu->header, readout->image, 0, NULL);
     291                psFitsClose(fits);
     292            }
     293            {
     294                pmHDU *hdu = pmHDUFromCell(readout->parent);
     295                psString name = NULL;
     296                psStringAppend(&name, "/local/tmp/real_var_%03d.fits", index);
     297                pmStackVisualPlotTestImage(readout->variance, name);
     298                psFits *fits = psFitsOpen(name, "w");
     299                psFree(name);
     300                psFitsWriteImage(fits, hdu->header, readout->variance, 0, NULL);
    289301                psFitsClose(fits);
    290302            }
    … …  
    355367
    356368
    357 #ifdef TESTING
     369#ifdef TESTING_CZW
    358370            {
    359371                pmHDU *hdu = pmHDUFromCell(readout->parent);
    360372                psString name = NULL;
    361                 psStringAppend(&name, "conv_%03d.fits", index);
     373                psStringAppend(&name, "/local/tmp/conv_%03d.fits", index);
    362374                pmStackVisualPlotTestImage(conv->image, name);
    363375                psFits *fits = psFitsOpen(name, "w");
    … …  
    369381                pmHDU *hdu = pmHDUFromCell(readout->parent);
    370382                psString name = NULL;
    371                 psStringAppend(&name, "diff_%03d.fits", index);
     383                psStringAppend(&name, "/local/tmp/conv_var_%03d.fits", index);
     384                pmStackVisualPlotTestImage(conv->variance, name);
     385                psFits *fits = psFitsOpen(name, "w");
     386                psFree(name);
     387                psFitsWriteImage(fits, hdu->header, conv->variance, 0, NULL);
     388                psFitsClose(fits);
     389            }
     390            {
     391                pmHDU *hdu = pmHDUFromCell(readout->parent);
     392                psString name = NULL;
     393                psStringAppend(&name, "/local/tmp/diff_%03d.fits", index);
    372394                pmStackVisualPlotTestImage(fake->image, name);
    373395                psFits *fits = psFitsOpen(name, "w");
    … …  
    510532    }
    511533
    512     if (!stackRenormaliseReadout(config, readout)) {
    513         psFree(rng);
    514         psFree(bg);
    515         return false;
    516     }
    517 
     534#ifdef TESTING_CZW
     535    // CZW begin check of weight before renormalize step
    518536    // Measure the variance level for the weighting
    519537    if (psMetadataLookupBool(NULL, recipe, "WEIGHTS")) {
    … …  
    529547        options->weightings->data.F32[index] = 1.0;
    530548    }
    531     psLogMsg("ppStack", PS_LOG_INFO, "Weighting for image %d is %f\n",
    532              index, options->weightings->data.F32[index]);
     549    psLogMsg("ppStack", PS_LOG_INFO, "Prenorm Weighting for image %d is %g covar %g median %g\n",
     550             index, options->weightings->data.F32[index],psImageCovarianceFactor(readout->covariance),
     551             psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN));
     552    // CZW end
     553#endif
     554    if (!stackRenormaliseReadout(config, readout)) {
     555        psFree(rng);
     556        psFree(bg);
     557        return false;
     558    }
     559   
     560    // Measure the variance level for the weighting
     561    if (psMetadataLookupBool(NULL, recipe, "WEIGHTS")) {
     562        if (!psImageBackground(bg, NULL, readout->variance, readout->mask, maskVal | maskBad, rng)) {
     563            psError(PPSTACK_ERR_DATA, false, "Can't measure mean variance for image.");
     564            psFree(rng);
     565            psFree(bg);
     566            return false;
     567        }
     568        options->weightings->data.F32[index] = 1.0 / (psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN) *
     569                                                      psImageCovarianceFactor(readout->covariance));
     570    } else {
     571        options->weightings->data.F32[index] = 1.0;
     572    }
     573    psLogMsg("ppStack", PS_LOG_INFO, "Weighting for image %d is %g covar %g median %g\n",
     574             index, options->weightings->data.F32[index],psImageCovarianceFactor(readout->covariance),
     575             psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN));
    533576
    534577    psFree(rng);
  • branches/eam_branches/ipp-20130307/ppStack/src/ppStackPrepare.c

    r34800 r35413  
    11# include "ppStack.h"
     2
     3
     4// Option to use the old FWHM rejection code.
     5# define NEW_REJECTION
     6// #define OLD_REJECTION
     7
    28
    39# define RE_PHOTOMETER 0
    … …  
    253259    float maxFWHM = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.MAX"); // max allowed input fwhm
    254260    float clipFWHMnSig = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.CLIP.NSIGMA"); // sigma clipping of inputs
    255 
     261    float threshFWHM = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.THRESH"); // FWHM size that we refuse to clip below
     262    float asymmetryFWHM = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.ASYMMETRY"); // max bimodal asymmetry
    256263    psString log = psStringCopy("Input seeing FWHMs:\n"); // Log message
    257264    bool havePSFs = false;                                // Do we have any PSFs?
    … …  
    286293            options->inputSeeing->data.F32[i] = sumFWHM / (float)numFWHM;
    287294        }
    288 
     295#ifdef OLD_REJECTION
    289296        // reject any input images which exceed the specified max FWHM
    290297        if (isfinite(maxFWHM) && (options->inputSeeing->data.F32[i] > maxFWHM)) {
    … …  
    292299            psLogMsg("ppStack", PS_LOG_INFO, "PSF FWHM for image %d is too large (%f vs %f maxFWHM) --- rejected.", i, options->inputSeeing->data.F32[i], maxFWHM);
    293300        }
    294 
     301        // End old rejection fixed limit.
     302#endif
    295303        psStringAppend(&log, "Input %d: %f\n", i, options->inputSeeing->data.F32[i]);
    296304    }
    … …  
    300308    psFree(log);
    301309
     310#ifdef NEW_REJECTION
     311    // Do GMM test with two modes to decide where to put the break.
     312    double Punimodal;
     313    int m = 2;
     314    psVector *modes = psVectorAlloc(num,PS_TYPE_F32);
     315    psVector *means = psVectorAlloc(m,PS_TYPE_F32);
     316    psVector *S     = psVectorAlloc(m,PS_TYPE_F32);
     317    psVector *pi    = psVectorAlloc(m,PS_TYPE_F32);
     318    psImage *P      = psImageAlloc(m,num,PS_TYPE_F32);
     319    float limit;
     320    if (!psMM1DClass(options->inputSeeing,
     321                     options->inputSeeing->n,
     322                     modes,means,
     323                     S,pi,P,
     324                     2,
     325                     &Punimodal)) {
     326      // Handle error here
     327      psFree(modes);
     328      psFree(means);
     329      psFree(S);
     330      psFree(pi);
     331      psFree(P);
     332      return(false);
     333    }
     334    //    fprintf(stderr,"means: %g %g\n",means->data.F32[0],means->data.F32[1]);
     335    //    fprintf(stderr,"sigma: %g %g \n",S->data.F32[0],S->data.F32[1]);
     336
     337    //    fprintf(stderr,"pi:    %g %g\n",pi->data.F32[0],pi->data.F32[1]);
     338   
     339    //    unwrittenGMMfunction(options->inputSeeing, options->inputMask, 0xff,
     340    //           &Punimodal,
     341    //           &m1,&s1,&pi1,
     342    //           &m2,&s2,&pi2);
     343
     344    // Use Gaussian mixture model analysis of the FWHM distribution to decide an optional FWHM limit
     345    if ((Punimodal > 0.5)|| // This distribution is best represented by a single mode
     346        (num <= 4)) {       // Or we have a small number of inputs, making this statistic poor.
     347      limit = maxFWHM;
     348    }
     349    else {                  // This is a bimodal distribution
     350      if ((fabs(pi->data.F32[0] - pi->data.F32[1]) < asymmetryFWHM)||  // However, both modes are equally populated
     351          (pi->data.F32[1] > pi->data.F32[0])) {                       // Or the larger FWHM mode is more populated
     352        limit = means->data.F32[1] + clipFWHMnSig * S->data.F32[1];
     353      }
     354      else {                                   // The smaller FWHM mode is more populated
     355        limit = means->data.F32[0] + clipFWHMnSig * S->data.F32[0];
     356      }
     357    }
     358    if (limit > maxFWHM)    { limit = maxFWHM; }    // We should not be larger than our max
     359    if (limit < threshFWHM) { limit = threshFWHM; } // Nor smaller than our min
     360
     361    for (int i = 0; i < num; i++) {
     362      if (options->inputSeeing->data.F32[i] > limit) {
     363        options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PPSTACK_MASK_PSF;
     364        psLogMsg("ppStack", PS_LOG_INFO,
     365                 "PSF FWHM for image %d is too large (%f vs %f fwhmlimit) --- rejected",
     366                 i, options->inputSeeing->data.F32[i],limit);
     367      }
     368    }
     369    psFree(means);
     370    psFree(modes);
     371    psFree(S);
     372    psFree(pi);
     373    psFree(P);
     374    // End new rejection code
     375#endif
     376   
     377#ifdef OLD_REJECTION
    302378    // We should have the ability to filter the input list based on the seeing:
    303379    // * reject above some max value and/or min value
    … …  
    323399        }
    324400    }
    325 
     401    // End old rejection sigma clip
     402#endif
    326403    // Generate target PSF
    327404    if (options->convolve) {
  • branches/eam_branches/ipp-20130307/ppStack/src/ppStackSources.c

    r34174 r35413  
    1111#endif
    1212
    13 #ifdef TESTING
     13// #define TESTING_CZW
     14
     15#ifdef TESTING_CZW
    1416// Dump matches to a file
    1517static void dumpMatches(const char *filename, // File to which to dump
    … …  
    2830        psVectorInit(magErr, NAN);
    2931        for (int j = 0; j < match->num; j++) {
     32          if (match->mask) {
    3033            if (match->mask->data.PS_TYPE_VECTOR_MASK_DATA[j]) {
    31                 continue;
    32             }
     34              continue;
     35            }
     36          }
    3337            int index = match->image->data.U32[j]; // Image index
    3438            mag->data.F32[index] = match->mag->data.F32[j] - zp->data.F32[index];
    … …  
    3943        }
    4044        for (int j = 0; j < num; j++) {
    41             fprintf(outMatches, "%f (%f) ", mag->data.F32[j], magErr->data.F32[j]);
     45          fprintf(outMatches, "%f %f %f %f %f %f\t",
     46                  match->mag->data.F32[j],
     47                  zp->data.F32[j],
     48                  trans ? trans->data.F32[j] : NAN,
     49                  magErr->data.F32[j],
     50                  match->x->data.F32[j],
     51                  match->y->data.F32[j]);
    4252        }
    4353        fprintf(outMatches, "\n");
    … …  
    271281        return false;
    272282    }
    273 
    274 #ifdef TESTING
     283    options->sources = psMemIncrRefCounter(matches);
     284    psArray *matchedSources = psArrayAlloc(0);
     285
     286#ifdef TESTING_CZW
    275287    dumpMatches("source_match.dat", num, matches, zp, NULL);
    276288#endif
    277289
    278290    if (options->matchZPs) {
    279         psVector *trans = pmSourceMatchRelphot(matches, zp, tol, iter1, starRej1, starSys1,
     291
     292      psVector *trans = pmSourceMatchRelphot(matches, matchedSources, zp, tol, iter1, starRej1, starSys1,
    280293                                               iter2, starRej2, starSys2, starLimit,
    281294                                               transIter, transRej, transThresh); // Transparencies per image
    … …  
    324337
    325338        // m_inst_o - m_inst_i = zp[i] - zpTarget - c1 * airmassTarget - 2.5log(sumExpTime) - trans_i
    326 
     339#ifdef TESTING_CZW
     340    dumpMatches("source_match2.dat", num, matches, zp, trans);
     341#endif
    327342        if (options->matchZPs) {
    328343            options->norm = psVectorAlloc(num, PS_TYPE_F32);
    329344            for (int i = 0; i < num; i++) {
    330                 if (inputMask->data.U8[i] || !isfinite(trans->data.F32[i])) {
    331                     continue;
    332                 }
     345              if (!isfinite(trans->data.F32[i])) {
     346                continue;
     347              }
    333348                psArray *sources = sourceLists->data[i]; // Sources of interest
    334349                float magCorr = zp->data.F32[i] - trans->data.F32[i] - 2.5*log10(options->sumExposure) - airmassTerm * airmassTarget;
    … …  
    341356                options->norm->data.F32[i] = magCorr;
    342357                psLogMsg("ppStack", PS_LOG_INFO,
    343                          "Applying scale correction to image %d: %f mag (%f)\n",
    344                          i, magCorr, trans->data.F32[i]);
     358                         "Applying scale correction to image %d: %f mag (%f) (with inputMask value %d)\n",
     359                         i, magCorr, trans->data.F32[i],inputMask->data.U8[i]);
    345360
    346361                for (int j = 0; j < sources->n; j++) {
    347362                    pmSource *source = sources->data[j]; // Source of interest
     363                    source->psfMag += magCorr;
     364                    source->apMag += magCorr;
     365
    348366                    if (!source) {
    349367                        continue;
    350368                    }
    351369                    // XXX need to apply to apMag as well
    352                     source->psfMag += magCorr;
    353                     source->apMag += magCorr;
     370                    psTrace("ppStack",5,"Source corrections: %d %d %f %f %f %f %f %f %f %f\n",i,j,
     371                            source->peak->xf,source->peak->yf,
     372                            source->psfMag,source->psfMagErr,
     373                            airmassTerm,airmassTarget,2.5 * log10(options->sumExposure),
     374                            source->psfMag + magCorr);
    354375                }
    355376            }
    356377        }
     378        matches = pmSourceMatchSources(sourceLists, radius, true); // List of matches
    357379
    358380        if (zpExpNum == numGoodImages) {
    … …  
    366388
    367389
    368 #ifdef TESTING
    369         dumpMatches("source_mags.dat", num, matches, zp, trans);
    370 #endif
    371390        psFree(trans);
    372391
    373 #ifdef TESTING
     392#ifdef TESTING_CZW
    374393        // Double check: all transparencies should be zero
    375394        {
    376395            psArray *matches = pmSourceMatchSources(sourceLists, radius, true); // List of matches
     396            psArray *matchedSources = psArrayAlloc(matches->n);
    377397            if (!matches) {
    378398                psError(PPSTACK_ERR_DATA, false, "Unable to match sources");
    … …  
    380400                return false;
    381401            }
    382             psVector *trans = pmSourceMatchRelphot(matches, zp, tol, iter1, starRej1, starSys1,
     402            psVector *trans = pmSourceMatchRelphot(matches, matchedSources, zp, tol, iter1, starRej1, starSys1,
    383403                                                   iter2, starRej2, starSys2, starLimit,
    384404                                                   transIter, transRej, transThresh); // Transparencies
    … …  
    386406                fprintf(stderr, "Transparency of image %d: %f\n", i, trans->data.F32[i]);
    387407            }
     408
    388409            psFree(trans);
    389410            psFree(matches);
    390         }
    391 #endif
    392     }
    393 
    394     psFree(zp);
     411            psFree(matchedSources);
     412        }
     413#endif
     414    }
     415
     416
    395417    psFree(zpExp);
    396418
    397419#ifdef ASTROMETRY
     420    // CZW: This is off by default.
    398421    // Position offsets
    399422    {
    … …  
    436459
    437460#if (defined TESTING && defined ASTROMETRY)
     461    // CZW: This is off by default.
    438462        // Double check: all offsets should be zero
    439463        {
    … …  
    458482    if (options->photometry) {
    459483        // Save best matches for future photometry
    460         psArray *sourcesBest = options->sources = psArrayAllocEmpty(matches->n);
    461 
     484      psArray *sourcesBest = options->sources = psArrayAllocEmpty(matches->n);
    462485        // XXX something of a hack: require at least 2 detections or the nominated fraction of the max possible
    463486        //int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required
    464487        //MEH - if many poor images, will hit oddity with num fraction. use numGoodImages instead
    465         int minMatches = PS_MAX(2, fracMatch * numGoodImages);// Minimum number of matches required
    466 
    467         int good0 = 0;
    468         for (int i = 0; i < num; i++) {
    469             if (inputMask->data.U8[i]) {
    470                 continue;
    471             }
    472             good0 = i;
    473             break;
     488      int minMatches = PS_MAX(2, fracMatch * numGoodImages);// Minimum number of matches required
     489     
     490      int good0 = 0;
     491      for (int i = 0; i < num; i++) {
     492        if (inputMask->data.U8[i]) {
     493          continue;
    474494        }
    475 
    476         for (int i = 0; i < matches->n; i++) {
    477             pmSourceMatch *match = matches->data[i]; // Match of interest
    478             if (match->num < minMatches) {
    479                 continue;
    480             }
    481 
    482             // We need to grab a single instance of this source: just take the first available
    483             // MEH - if first available is a rejected image, then problem. so take first non-rejected instance above
    484             //int image = match->image->data.S32[0]; // Index of image
    485             //int index = match->index->data.S32[0]; // Index of source within image
    486             int image = match->image->data.S32[good0]; // Index of image
    487             int index = match->index->data.S32[good0]; // Index of source within image
    488             psArray *sources = sourceLists->data[image]; // Sources for image
    489             pmSource *source = sources->data[index]; // Source of interest
    490 
    491             psArrayAdd(sourcesBest, sourcesBest->n, source);
    492         }
    493         psLogMsg("ppStack", PS_LOG_INFO, "Selected %ld sources for photometry analysis", sourcesBest->n);
    494     }
    495 
     495        good0 = i;
     496        break;
     497      }
     498     
     499      for (int i = 0; i < matches->n; i++) {
     500        pmSourceMatch *match = matches->data[i]; // Match of interest
     501         if (match->num < minMatches) {
     502           continue;
     503         }
     504
     505         // We need to grab a single instance of this source: just take the first available
     506         // MEH - if first available is a rejected image, then problem. so take first non-rejected instance above
     507         //      int image = match->image->data.S32[0]; // Index of image
     508         // int index = match->index->data.S32[0]; // Index of source within image
     509         int image = match->image->data.S32[good0]; // Index of image
     510         int index = match->index->data.S32[good0]; // Index of source within image
     511         psArray *sources = sourceLists->data[image]; // Sources for image
     512         pmSource *source = sources->data[index]; // Source of interest
     513
     514         // CZW: Accept the first source for all properties, except for the magnitudes.
     515         //      We have average magnitudes from relphot, so we should use those
     516         pmSource *photsource = matchedSources->data[i];
     517         if ((photsource)&&(isfinite(photsource->psfMag))) {
     518           // CZW: photsource is the average relphot mag, which is equal to <m_i + zpIN_j>
     519           //      (primed are averaged values for this discussion)
     520           //      Therefore, the correct magnitude for psfMag' is:
     521           //         psfMag' = (photsource - zpIN_j + magCorr)
     522           //      apMag - psfMag should be retained, so:
     523           //         apMag - psfMag = apMag' - psfMag'
     524           //         apMag' = apMag + psfMag' - psfMag
     525           source->apMag  = source->apMag + (photsource->psfMag + options->norm->data.F32[image] - zp->data.F32[image] - source->psfMag);
     526           source->psfMag = photsource->psfMag + options->norm->data.F32[image] - zp->data.F32[image];
     527           
     528           psTrace("ppStack", 5, "Best Source %d/%ld @ %f %f %f %f %f %d",i,sourcesBest->n,source->peak->xf,source->peak->yf,
     529                   source->psfMag,
     530                   photsource->psfMag + options->norm->data.F32[image] - zp->data.F32[image] ,
     531                   source->psfMagErr,-1);
     532           psArrayAdd(sourcesBest, sourcesBest->n, source);
     533         }
     534        }
     535      psLogMsg("ppStack", PS_LOG_INFO, "Selected %ld sources for photometry analysis", sourcesBest->n);
     536
     537    }
     538    psFree(zp);
    496539    psFree(matches);
    497540
  • branches/eam_branches/ipp-20130307/ppStack/src/ppStackTarget.c

    r34089 r35413  
    6060        }
    6161        float xSource, ySource;         // Coordinates of source
    62         coordsFromSource(&xSource, &ySource, NULL, source);
     62        float Smag;                      // magnitude of source
     63        coordsFromSource(&xSource, &ySource, &Smag, source);
    6364
    6465        coords->data.F64[0] = xSource;
    … …  
    6667
    6768        psVector *indices = psTreeAllWithin(tree, coords, exclusion); // Number within exclusion zone
    68         psTrace("ppStack", 9, "Source at %.0lf,%.0lf has %ld sources in exclusion zone",
    69                 coords->data.F64[0], coords->data.F64[1], indices->n);
     69        psTrace("ppStack", 5, "Filtering: Source at %.0lf %.0lf with mag %f has %ld sources in exclusion zone",
     70                coords->data.F64[0], coords->data.F64[1], Smag, indices->n);
    7071        if (indices->n == 1) {
    7172            // Only itself inside the exclusion zone
  • branches/eam_branches/ipp-20130307/psModules

  • branches/eam_branches/ipp-20130307/psModules/src/objects/pmSourceIO.c

    r34720 r35413  
    980980            return false;
    981981        }
     982
    982983        // if this is not TRUE, the output files only contain the psf measurements.
    983984        bool XSRC_OUTPUT = psMetadataLookupBool(&status, recipe, "EXTENDED_SOURCE_ANALYSIS");
    … …  
    10051006            hdu->header = psFitsReadHeader (NULL, file->fits);
    10061007        }
     1008
     1009        // "WCS" is CMF without detected objects
     1010        if (file->type == PM_FPA_FILE_WCS) {
     1011          psTrace("psModules.objects", 6, "read CMF table from %s : %s : %s", file->filename, headname, dataname);
     1012          psFree (headname);
     1013          psFree (dataname);
     1014          psFree (deteffname);
     1015          break;
     1016        }
     1017
     1018        // EXTDATA is the PSF data associated with this image header
    10071019
    10081020        // we need to find the corresponding table EXTNAME.
  • branches/eam_branches/ipp-20130307/psModules/src/objects/pmSourceMatch.c

    r35240 r35413  
    630630
    631631psVector *pmSourceMatchRelphot(const psArray *matches, // Array of matches
     632                               psArray *matchedSources, // Array of averaged sources
    632633                               const psVector *zp, // Zero points for each image (including airmass term)
    633634                               float tol, // Relative tolerance for convergence
    … …  
    648649    PS_ASSERT_VECTOR_TYPE(zp, PS_TYPE_F32, NULL);
    649650    PS_ASSERT_FLOAT_LARGER_THAN(transClip, 0.0, NULL);
    650 
     651    PS_ASSERT_ARRAY_NON_NULL(matchedSources, NULL);
     652   
    651653    sys1 *= sys1;
    652654    sys2 *= sys2;
    … …  
    742744    }
    743745
     746    for (int i = 0; i < matches->n; i++) {
     747      pmSource *source = pmSourceAlloc();
     748      source->psfMag = stars->data.F32[i];
     749      psArrayAdd(matchedSources,matchedSources->n,source);
     750    }
     751   
    744752    psFree(photo);
    745753    psFree(badImage);
  • branches/eam_branches/ipp-20130307/psModules/src/objects/pmSourceMatch.h

    r35240 r35413  
    7474/// Perform relative photometry to calibrate images
    7575psVector *pmSourceMatchRelphot(const psArray *matches, // Array of matches
     76                               psArray *matchedSources, // Array of average sources
    7677                               const psVector *zp, // Zero points for each image (including airmass term)
    7778                               float tol, // Relative tolerance for convergence
  • branches/eam_branches/ipp-20130307/psconfig

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/psphot

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/psphot/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/psphot/src/psphotStackImageLoop.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/psvideophot

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130307/pswarp/doc/notes.20130406.txt

    r35374 r35413  
    3131                        * sets file->fileLevel based on format, but slightly out of sync wrt pmFPAfileDefineFromArgs
    3232                          (NOTE: does not expect / examine any other file)
    33                          
    3433
     34
     35in pswarpLoop (major blocks):
     36
     37   * find the needed recipe / filerules / etc
     38   * pswarpIOChecksBefore() : generate the outputs?  (isn't this done in pswarpDefine?)
     39   * read input astrometry headers (also loads sources or not?)
     40   * apply astrometry headers to input->fpa
     41   * pswarpTransformReadout : transform pixels, etc
     42   * pswarpPixelsLit : measure filling & masks stats
     43   * modify the covariance
     44   * modify the ZP & trimsec (seems like these should be encapsulated)
     45   * update headers
     46   * measure the PSF   
     47   * measure pixel stats on output
     48   * add MD5 to header
     49   
     50   
     51
     52----
     53
     54pswarp issues:
     55
     561) operations need to loop over the output astrometry / targets for fpa/chip/cell levels
     57   a) I replaced pswarpDefineSkycell with an update to pmFPAfileDefineXX which does the looping
     58   b) is it identical in behavior to pswarpDefineSkycell?
     59      * YES : I can drop pswarpDefineSkycell
     60
     612) how do we load the SOURCES?
     62
     63   * I need to load the headers for the astrometry, and I do this by
     64     setting the type of the input astrometry to be WCS.  is this the
     65     same as CMF, but the latter reads the sources??
     66
     67   * by changing the filerules entry CMF <-> WCS pswarpDefine.c either does or does not read the sources
     68
     69     (for testing, I want to use a skycell image or template to define the astrometry; this would not have sources to be read)
     70
     713) does the I/O loop in pswarpLoop (pswarpIOChecksBefore) do anything useful?
     72   ** I don't think so... this operation is done in pswarpDefine.
     73
     744) how do I determine the overlaps correctly? (I'd like to do this before I load sources or pixels)
     75
     76   ** pswarpMapSetLocalModel does not seem to depend on astrometry model style (GOOD!)
     77   
  • branches/eam_branches/ipp-20130307/pswarp/src/Makefile.am

    r35382 r35413  
    3535        pswarpDefine.c                  \
    3636        pswarpDefineBackground.c        \
     37        pswarpDefineSkycell.c   \
    3738        pswarpErrorCodes.c              \
    3839        pswarpMapGrid.c                 \
  • branches/eam_branches/ipp-20130307/pswarp/src/pswarp.c

    r35373 r35413  
    3939    }
    4040
    41     // load the skycell layout information
     41    // load the skycell layout information:
     42    //   read the output astrometry description
     43    //   generate the output pixels
     44    //   convert header astrometry to pmFPA astrometry structures
    4245    if (!pswarpDefine(config)) {
    4346        pswarpCleanup(config, statsFile);
  • branches/eam_branches/ipp-20130307/pswarp/src/pswarpDefine.c

    r35373 r35413  
    3838    }
    3939   
    40     // open the full skycell file; no need to defer different depths. only load the header data
    41     pmFPAview *view = pmFPAviewAlloc (0);
    42     pmFPAfileOpen (skycell, view, config);
     40    // Read the output astrometry
     41    // XXX this section loops over the input skycell to load the header info
     42    {
     43        pmFPAview *view = pmFPAviewAlloc(0);
    4344
    44     // Read header and create target
    45     {
    46         if (!pmFPAReadHeaderSet(skycell->fpa, skycell->fits, config)) {
    47             psError(psErrorCodeLast(), false, "Unable to read headers for skycell.");
    48             psFree(view);
    49             return false;
    50         }
    51         view->chip = 0;
    52         view->cell = 0;
    53         view->readout = 0;
    54         pmCell *source = pmFPAfileThisCell(config->files, view, "PSWARP.SKYCELL"); ///< Source cell
    55         pmHDU *hdu = pmHDUFromCell(source); ///< HDU for source
    56         if (!hdu || !hdu->header) {
    57             psError(PM_ERR_PROG, false, "Unable to find header for sky cell.");
    58             psFree(view);
    59             return false;
    60         }
    61         int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); ///< Number of columns
    62         int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); ///< Number of rows
    63         if ((numCols == 0) || (numRows == 0)) {
    64             psError(PSWARP_ERR_DATA, false, "skycell has invalid dimensions %d x %d", numCols, numRows);
    65             psFree(view);
    66             return false;
    67         }
     45        pmChip *chip;
     46        if (!pmFPAfileRead (skycell, view, config)) {
     47            psError(PS_ERR_IO, false, "failed READ at FPA %s", skycell->name);
     48            psFree(view);
     49            return false;
     50        }
     51        while ((chip = pmFPAviewNextChip (view, skycell->fpa, 1)) != NULL) {
     52            psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
     53            if (!chip->process || !chip->file_exists) { continue; }
     54            if (!pmFPAfileRead (skycell, view, config)) {
     55                psError(psErrorCodeLast(), false, "failed READ at CHIP %s", skycell->name);
     56                psFree(view);
     57                return false;
     58            }
     59            pmCell *cell;
     60            while ((cell = pmFPAviewNextCell (view, skycell->fpa, 1)) != NULL) {
     61                psTrace ("pswarp", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     62                if (!cell->process || !cell->file_exists) { continue; }
     63                if (!pmFPAfileRead (skycell, view, config)) {
     64                    psError(psErrorCodeLast(), false, "failed READ at CELL %s", skycell->name);
     65                    psFree(view);
     66                    return false;
     67                }
     68                if (!pmFPAfileClose(skycell, view)) {
     69                    psError(psErrorCodeLast(), false, "failed CLOSE at CELL %s", skycell->name);
     70                    psFree (view);
     71                    return false;
     72                }
    6873
    69         pmCell *target = pmFPAviewThisCell(view, output->fpa); ///< Target cell
    70         pmReadout *readout = pmReadoutAlloc(target); ///< Target readout
    71         readout->image = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    72         psImageInit(readout->image, NAN);
    73         psFree(readout);                // Drop reference
    74 
    75         bool status = false;
    76         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XBIN");
    77         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YBIN");
    78         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XSIZE");
    79         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YSIZE");
    80         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.XPARITY");
    81         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.YPARITY");
    82         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.X0");
    83         psMetadataItemSupplement(&status, target->concepts, source->concepts, "CELL.Y0");
     74                // we've got the output astrom header
     75                pmHDU *hdu = pmHDUFromCell(cell); ///< HDU for source
     76                if (!hdu || !hdu->header) {
     77                    psError(PM_ERR_PROG, false, "Unable to find header for sky cell.");
     78                    psFree(view);
     79                    return false;
     80                }
     81                int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); ///< Number of columns
     82                int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); ///< Number of rows
     83                if ((numCols == 0) || (numRows == 0)) {
     84                    psError(PSWARP_ERR_DATA, false, "skycell has invalid dimensions %d x %d", numCols, numRows);
     85                    psFree(view);
     86                    return false;
     87                }
     88               
     89                // XXX generate the output pixels
     90                pmCell *target = pmFPAviewThisCell(view, output->fpa); ///< Target cell
     91                pmReadout *readout = pmReadoutAlloc(target); ///< Target readout
     92                readout->image = psImageAlloc(numCols, numRows, PS_TYPE_F32);
     93                psImageInit(readout->image, NAN);
     94                psFree(readout);                // Drop reference
     95               
     96                bool status = false;
     97                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.XBIN");
     98                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.YBIN");
     99                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.XSIZE");
     100                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.YSIZE");
     101                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.XPARITY");
     102                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.YPARITY");
     103                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.X0");
     104                psMetadataItemSupplement(&status, target->concepts, cell->concepts, "CELL.Y0");
     105            }
     106            if (!pmFPAfileClose(skycell, view)) {
     107                psError(psErrorCodeLast(), false, "failed CLOSE at CHIP %s", skycell->name);
     108                psFree (view);
     109                return false;
     110            }
     111        }
     112        if (!pmFPAfileClose(skycell, view)) {
     113            psError(psErrorCodeLast(), false, "failed CLOSE at FPA %s", skycell->name);
     114            psFree (view);
     115            return false;
     116        }
     117        psFree(view);
    84118    }
    85119
    86     // XXX this is not a sufficient test
     120    // the section below converts the header astrometry info (in skycell) to the pmFPA
     121    // astrometry structures, saving them on the output fpa structure.
     122
     123    // XXX this block should be modified to loop over all chips
     124
     125    pmFPAview *view = pmFPAviewAlloc (0);
    87126    view->chip = 0;
    88127    view->cell = 0;
  • branches/eam_branches/ipp-20130307/pswarp/src/pswarpDefineSkycell.c

    r27096 r35413  
    7373    psFitsClose(fits);
    7474
    75     // We need to force the format for the skycell to be equivalent to SIMPLE.  Determine
    76     // the current format from the header; Determine camera if not specified already
    77     // XXX EAM : this operation should be defined as a pmConfig function (pmConfigCopy?)
    78     skyConfig = pmConfigAlloc();
    79     skyConfig->user = psMemIncrRefCounter(config->user);
    80     skyConfig->system = psMemIncrRefCounter(config->system);
     75    { // this bit is unique to pswarpDefineSkycell:
    8176
    82     psFree (skyConfig->files);
    83     skyConfig->files = psMemIncrRefCounter(config->files);
    84     psFree (skyConfig->arguments);
    85     skyConfig->arguments = psMemIncrRefCounter(config->arguments);
     77      // We need to force the format for the skycell to be equivalent to SIMPLE.  Determine
     78      // the current format from the header; Determine camera if not specified already
     79      // XXX EAM : this operation should be defined as a pmConfig function (pmConfigCopy?)
     80      skyConfig = pmConfigAlloc();
     81      skyConfig->user = psMemIncrRefCounter(config->user);
     82      skyConfig->system = psMemIncrRefCounter(config->system);
     83
     84      psFree (skyConfig->files);
     85      skyConfig->files = psMemIncrRefCounter(config->files);
     86      psFree (skyConfig->arguments);
     87      skyConfig->arguments = psMemIncrRefCounter(config->arguments);
     88    }
    8689
    8790    format = pmConfigCameraFormatFromHeader (NULL, NULL, NULL, skyConfig, phu, false);
    … …  
    9497
    9598    // Record the camera name of the skycell, so we can save its configuration
    96     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "SKYCELL.CAMERA", 0, "Name of camera for skycell",
    97                     skyConfig->cameraName);
     99    // XXX this can be put outside of the f
     100    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "SKYCELL.CAMERA", 0, "Name of camera for skycell", skyConfig->cameraName);
    98101
    99102    // build the template fpa, set up the basic view
  • branches/eam_branches/ipp-20130307/pswarp/src/pswarpLoop.c

    r35373 r35413  
    7777    // Turn all skycell files on to generate them, and then turn them off for the loop over the input images
    7878    // the input, which is in a different format.
    79     {
    80         pswarpFileActivation(config, detectorFiles, false);
    81         pswarpFileActivation(config, photFiles, false);
    82         pswarpFileActivation(config, independentFiles, false);
    83         pswarpFileActivation(config, skycellFiles, true);
    84         if (!pswarpIOChecksBefore(config)) {
    85             psError(psErrorCodeLast(), false, "Unable to read files.");
    86             goto DONE;
    87         }
    88         pswarpFileActivation(config, skycellFiles, false);
    89     }
     79    // XXX why is this being done here, doesn't it duplicate the work in pswarpDefine.c??
     80    pswarpFileActivation(config, detectorFiles, false);
     81    pswarpFileActivation(config, photFiles, false);
     82    pswarpFileActivation(config, independentFiles, false);
     83    pswarpFileActivation(config, skycellFiles, false);
     84   
     85    // pswarpFileActivation(config, skycellFiles, true);
     86    // if (0) {
     87    //   if (!pswarpIOChecksBefore(config)) {
     88    //     psError(psErrorCodeLast(), false, "Unable to read files.");
     89    //     goto DONE;
     90    //   }
     91    // }
     92   
    9093
    9194    // Read the input astrometry
    … …  
    164167    }
    165168
     169    // *** main transformation block
    166170    pmChip *chip;
    167171    while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
  • branches/eam_branches/ipp-20130307/pswarp/src/pswarpParseCamera.c

    r35382 r35413  
    5555}
    5656
    57 
    58 
    59 
    6057bool pswarpParseCamera(pmConfig *config)
    6158{
    … …  
    7067    }
    7168
    72     pmFPAfile *astrom = defineInputFile(config, NULL, "PSWARP.ASTROM", "ASTROM", PM_FPA_FILE_CMF);
     69    // XXX I should allow the astrometry input to be either WCS or CMF
     70    // Define the input astrometry file(s)
     71    bool status = false;
     72    pmFPAfile *astrom = pmFPAfileDefineFromArgs(&status, config, "PSWARP.ASTROM", "ASTROM");
     73    if (!astrom) {
     74        // look for the file on the RUN metadata
     75        astrom = pmFPAfileDefineFromRun(&status, NULL, config, "PSWARP.ASTROM"); // File to return
     76        if (!status) {
     77            psLogMsg("pswarp", PS_LOG_INFO, "Failed to load file definition for %s", "PSWARP.ASTROM");
     78        }
     79    }
     80    if ((astrom->type != PM_FPA_FILE_CMF) && (astrom->type != PM_FPA_FILE_WCS)) {
     81        psLogMsg("pswarp", PS_LOG_INFO, "%s is neither CMF nor WCS", "PSWARP.ASTROM");
     82    }
    7383    psLogMsg("pswarp", PS_LOG_INFO, "Astrometry source: %s", astrom ? "supplied" : "header");
    7484
     85    // Define the input mask file(s)
    7586    pmFPAfile *inMask = defineInputFile(config, input, "PSWARP.MASK", "MASK", PM_FPA_FILE_MASK);
    7687    if (!inMask) {
    … …  
    7889    }
    7990
     91    // Define the input variance file(s)
    8092    pmFPAfile *inVariance = defineInputFile(config, input, "PSWARP.VARIANCE", "VARIANCE",
    8193                                            PM_FPA_FILE_VARIANCE);
    … …  
    91103   
    92104    // The input skycell is a required argument: it defines the output image
    93     bool status = false;
    94105    pmConfig *skyConfig = NULL;
    95     pmFPAfile *skycell = pmFPAfileDefineNewConfig(&status, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL");
     106    pmFPAfile *skycell = NULL;
     107
     108# define USE_PSWARP_DEFINE_SKYCELL 0
     109# if (USE_PSWARP_DEFINE_SKYCELL)
     110    // XXX this function is no longer needed; drop
     111    status = pswarpDefineSkycell(&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL");
     112# else
     113    skycell = pmFPAfileDefineNewConfig(&status, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL");
     114# endif
     115
    96116    if (!status || !skycell) {
    97117      psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.SKYCELL");
Note: See TracChangeset for help on using the changeset viewer.