IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14164


Ignore:
Timestamp:
Jul 12, 2007, 9:43:09 AM (19 years ago)
Author:
eugene
Message:

respect recipe and command-line options for mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroAnalysis.c

    r13832 r14164  
    33bool psastroAnalysis (pmConfig *config) {
    44
     5    bool status;
    56    int nStars;
    67
     
    2829    }
    2930
    30     // XXX does this check the recipe??
    31     bool chipastro = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.CHIP.MODE");
    32     bool mosastro  = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.MOSAIC.MODE");
     31    // select the current recipe
     32    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE);
     33    if (!recipe) {
     34        psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe");
     35        return false;
     36    }
     37
     38    // check the command-line arguments first
     39    bool chipastro = psMetadataLookupBool (&status, config->arguments, "PSASTRO.CHIP.MODE");
     40    if (!status) {
     41        chipastro = psMetadataLookupBool (&status, recipe, "PSASTRO.CHIP.MODE");
     42    }
     43    bool mosastro  = psMetadataLookupBool (&status, config->arguments, "PSASTRO.MOSAIC.MODE");
     44    if (!status) {
     45        mosastro  = psMetadataLookupBool (&status, recipe, "PSASTRO.MOSAIC.MODE");
     46    }
    3347    if (!chipastro && !mosastro) {
    34         psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip mode\n");
     48        psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip astrometry\n");
    3549        chipastro = true;
    3650    }
Note: See TracChangeset for help on using the changeset viewer.