IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7573


Ignore:
Timestamp:
Jun 14, 2006, 4:20:43 PM (20 years ago)
Author:
eugene
Message:

adding autoconf stuff

Location:
trunk/psastro
Files:
4 added
1 deleted
3 edited

Legend:

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

    r7332 r7573  
    4141    if ((N = psArgumentGet (*argc, argv, "-chip"))) {
    4242        psArgumentRemove (N, argc, argv);
    43         psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTION", PS_DATA_STRING, "", psStringCopy(argv[N]));
     43        psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "", psStringCopy(argv[N]));
    4444        psArgumentRemove (N, argc, argv);
    4545    }
  • trunk/psastro/src/psastroLoadReferences.c

    r7332 r7573  
    33
    44# define ELIXIR_MODE 1
     5# define PIPE_MODE 1
    56
    67psArray *psastroLoadReferences (pmConfig *config) {
     
    89    int fd;
    910    bool status;
    10     char tempFile[64], tempLine[256];
     11    char tempLine[256];
    1112
    1213    // select the DVO database?
     
    2526    // getstar -region RAmin RAmax DECmin DECmax
    2627
     28# if PIPE_MODE
     29    // use fork to add timeout capability
     30    // use cfitsio |filename format to avoid tempFile
     31    # if ELIXIR_MODE
     32    sprintf (tempLine, "getstar -D CATFORMAT elixir -D CATMODE mef -region %f %f %f %f |", RAmin, DECmin, RAmax, DECmax, tempFile);
     33    # else
     34    sprintf (tempLine, "getstar -D CATFORMAT panstarrs -D CATMODE mef -region %f %f %f %f |", RAmin, DECmin, RAmax, DECmax, tempFile);
     35    # endif
     36
     37    psTrace (__func__, 3, "%s\n", tempLine);
     38
     39    // the output from getstar is a file with the Average table
     40    psFits *fits = psFitsOpen (tempLine, "r");
     41
     42    # if ELIXIR_MODE
     43    psFitsMoveExtName (fits, "DVO_AVERAGE_ELIXIR");
     44    # else
     45    psFitsMoveExtName (fits, "DVO_AVERAGE_PANSTARRS");
     46    # endif
     47
     48    psMetadata *header = psFitsReadHeader (NULL, fits);
     49    psArray *table = psFitsReadTable (fits);
     50    psFitsClose (fits);
     51
     52# else /***** use a temp file instead ****/
     53
     54    char tempFile[64];
    2755    sprintf (tempFile, "/tmp/psastro.XXXXXX");
    2856    if ((fd = mkstemp (tempFile)) == -1) {
     
    6189    unlink (tempFile);
    6290
     91# endif
     92
    6393    // convert the Average table to the pmAstromObj entries
    6494    psArray *refs = psArrayAlloc (table->n);
  • trunk/psastro/src/psastroParseCamera.c

    r7084 r7573  
    4444    return true;
    4545}
    46 
    47 
    48 // useful for debugging
    49 # if 0
    50 for (int i = 0; i < input->fpa->chips->n; i++) {
    51     pmChip *chip = input->fpa->chips->data[i];
    52     fprintf (stderr, "chip %2d: %x %x\n", i, chip->file_exists, chip->process);
    53 
    54     for (int j = 0; j < chip->cells->n; j++) {
    55         pmCell *cell = chip->cells->data[j];
    56         fprintf (stderr, "cell %2d: %x %x\n", j, cell->file_exists, cell->process);
    57 
    58     }
    59 }
    60 # endif
Note: See TracChangeset for help on using the changeset viewer.