IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 19, 2007, 3:58:02 PM (19 years ago)
Author:
eugene
Message:

updates to fix mosaic astrometry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpParseCamera.c

    r10954 r12505  
    44
    55    bool status;
     6    pmFPAfile *skycell = NULL;
     7    pmConfig *skyConfig = NULL;
    68
    79    // the input image(s) are required arguments; they define the camera
     
    1315    }
    1416
     17    // the input image(s) are required arguments; they define the camera
     18    status = false;
     19    pmFPAfileDefineFromArgs (&status, config, "PSWARP.ASTROM", "ASTROM");
     20    if (status) {
     21        fprintf (stderr, "using supplied astrometry\n");
     22    } else {
     23        fprintf (stderr, "using header astrometry\n");
     24    }
     25
     26    // the mask is not required - but must conform to input camera
     27    if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.MASK", "MASK")) {
     28        fprintf (stderr, "no mask supplied\n");
     29    }
     30
     31    if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.WEIGHT", "WEIGHT")) {
     32        fprintf (stderr, "no weight supplied\n");
     33    }
     34
    1535    // the input skycell is a required argument: it defines the output image
    16     status = false;
    17     pmFPAfile *skycell = pmFPAfileDefineFromArgs (&status, config, "PSWARP.SKYCELL", "SKYCELL");
    18     if (!skycell) {
     36    // XXX we may need a different skycell structure here
     37    status = pswarpDefineSkycell (&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL");
     38    if (!status) {
    1939        psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.SKYCELL");
    2040        return false;
    2141    }
    2242
    23     // the mask is not required; the  skycell is a required argument: it defines the output image
    24     status = false;
    25     pmFPAfileDefineFromArgs (&status, config, "PSWARP.MASK", "MASK");
    26     if (!status) {
    27       // build the basic mask concept here
    28     }
    29 
    30     // the weight is not required; the  skycell is a required argument: it defines the output image
    31     status = false;
    32     pmFPAfileDefineFromArgs (&status, config, "PSWARP.WEIGHT", "WEIGHT");
    33     if (!status) {
    34       // build the basic weight concept here
    35     }
    36 
    3743    // these calls bind the I/O handle to the specified fpa
    38     if (!pmFPAfileDefineOutput (config, skycell->fpa, "PSWARP.OUTPUT")) {
     44    if (!pmFPAfileDefineOutput (skyConfig, skycell->fpa, "PSWARP.OUTPUT")) {
    3945        psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT");
    4046        return false;
     
    5561    }
    5662    psFree (chips);
     63    psFree (skyConfig);
    5764
    5865    psTrace("pswarp", 1, "Done with pswarpParseCamera...\n");
Note: See TracChangeset for help on using the changeset viewer.