IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2009, 4:56:07 PM (17 years ago)
Author:
eugene
Message:

add psastroExtract (first working version)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/eam_branch_20090312/psastro/src/psastroExtractParseCamera.c

    r23322 r23335  
    1616
    1717    bool status = false;
    18     pmFPAfile *input = NULL;
    1918
    2019    // the input image(s) are required arguments; they define the camera
     
    2928    status = false;
    3029    pmFPAfile *astrom = pmFPAfileDefineFromArgs(&status, config, "PSASTRO.EXTRACT.ASTROM", "ASTROM");
    31     if (!status) {
     30    if (!astrom || !status) {
    3231        psError (PS_ERR_UNKNOWN, false, "failed to load astrometry definition");
    3332        return NULL;
    34     }
    35     if (astrom) {
    36         psLogMsg ("psastro", 3, "using supplied astrometry\n");
    37     } else {
    38         psLogMsg ("psastro", 3, "using header astrometry\n");
    3933    }
    4034
     
    5448    psArray *chips = psStringSplitArray (chipLine, ",", false);
    5549    if (chips->n > 0) {
    56         pmFPASelectChip (output->fpa, -1, true); // deselect all chips
     50        pmFPASelectChip (input->fpa, -1, true); // deselect all chips
     51        pmFPASelectChip (astrom->fpa, -1, true); // deselect all chips
    5752        for (int i = 0; i < chips->n; i++) {
    5853            int chipNum = atoi(chips->data[i]);
    59             if (! pmFPASelectChip(output->fpa, chipNum, false)) {
     54            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
     55                psError(PSASTRO_ERR_CONFIG, true, "Chip number %d doesn't exist in camera.\n", chipNum);
     56                return false;
     57            }
     58            if (! pmFPASelectChip(astrom->fpa, chipNum, false)) {
    6059                psError(PSASTRO_ERR_CONFIG, true, "Chip number %d doesn't exist in camera.\n", chipNum);
    6160                return false;
Note: See TracChangeset for help on using the changeset viewer.