IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 11, 2007, 1:59:28 PM (19 years ago)
Author:
eugene
Message:

moved analysis steps into psastroAnalysis.c
moved file definitions into psastroDefineFiles.c
created psastroInternal.h, and psastroStandAlone.h
moved library prototypes only in psastro.h

File:
1 edited

Legend:

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

    r12492 r12806  
    1 # include "psastro.h"
     1# include "psastroStandAlone.h"
    22
    33static void usage (void) {
     
    99
    1010    pmConfig *config = NULL;
    11     psArray *refs = NULL;
    1211
    1312    psTimerStart ("complete");
     
    3635    }
    3736
    38     // interpret the available initial astrometric information
    39     // apply the initial guess
    40     if (!psastroAstromGuess (config)) {
    41         psErrorStackPrint(stderr, "failed to determine initial astrometry guess\n");
     37    if (!psastroAnalysis (config)) {
     38        psErrorStackPrint(stderr, "failure in psastro analysis\n");
    4239        exit (1);
    4340    }
    44 
    45     // load the reference stars overlapping the data stars
    46     refs = psastroLoadRefstars (config);
    47     if (!refs) {
    48         psErrorStackPrint(stderr, "failed to load reference data\n");
    49         exit (1);
    50     }
    51 
    52     // choose reference stars corresponding to the selected chips
    53     if (!psastroChooseRefstars (config, refs)) {
    54         psErrorStackPrint(stderr, "failed to select reference data for chips\n");
    55         exit (1);
    56     }
    57 
    58     // XXX does this check the recipe??
    59     bool chipastro = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.CHIP.MODE");
    60     bool mosastro  = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.MOSAIC.MODE");
    61     if (!chipastro && !mosastro) {
    62         psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip mode\n");
    63         chipastro= true;
    64     }
    65 
    66     if (chipastro) {
    67         if (!psastroChipAstrom (config, refs)) {
    68             psErrorStackPrint(stderr, "failed to perform single chip astrometry\n");
    69             exit (1);
    70         }
    71     }
    72 
    73     if (mosastro) {
    74         if (!psastroMosaicAstrom (config, refs)) {
    75             psErrorStackPrint(stderr, "failed to perform mosaic camera astrometry\n");
    76             exit (1);
    77         }
    78     }
    79 
    80     // XXX how do we specify stack astrometry?
    81     // psastroStackAstrom (config, refs);
    82 
     41   
    8342    // write out the results
    8443    if (!psastroDataSave (config)) {
     
    8948    psLogMsg ("psastro", 3, "complete psastro run: %f sec\n", psTimerMark ("complete"));
    9049
    91     psastroCleanup (config, refs);
     50    psastroCleanup (config);
    9251    exit (EXIT_SUCCESS);
    9352}
Note: See TracChangeset for help on using the changeset viewer.