IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 10, 2007, 3:50:04 PM (19 years ago)
Author:
eugene
Message:

added DVO.GETSTAR to recipe

File:
1 edited

Legend:

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

    r12718 r12794  
    66    int fd;
    77    bool status;
    8     char *catformat = NULL;
    9     char *getstarLine = NULL;
    10 
    11     // select the DVO database?
    128
    139    // select the current recipe
     
    2420    // XXX which is then selected from the top-level ipprc.config
    2521    char *CATDIR = psMetadataLookupStr(NULL, recipe, "DVO.CATDIR");
    26     if (CATDIR == NULL) {
    27         psLogMsg ("psastro", 2, "warning: missing DVO.CATDIR, using ~/.ptolemyrc definition\n");
    28     }
     22    PS_ASSERT (CATDIR, NULL);
     23
     24    char *getstarCommand = psMetadataLookupStr(NULL, recipe, "DVO.GETSTAR");
     25    PS_ASSERT (getstarCommand, NULL);
    2926
    3027    // issue the following command:
    3128    // getstar -region RAmin RAmax DECmin DECmax
    32 
    3329    char tempFile[64];
    3430    sprintf (tempFile, "/tmp/psastro.XXXXXX");
     
    4339    // use fork to add timeout capability
    4440    if (ELIXIR_MODE) {
    45         psStringAppend (&catformat, "-D CATFORMAT elixir ");
     41        psStringAppend (&getstarCommand, " -D CATFORMAT elixir");
    4642    } else {
    47         psStringAppend (&catformat, "-D CATFORMAT panstarrs ");
     43        psStringAppend (&getstarCommand, " -D CATFORMAT panstarrs");
    4844    }
    4945
     46    // XXX check for a default name (use .ptolemyrc)?
    5047    if (CATDIR) {
    51         psStringAppend (&catformat, "-D CATDIR %s ", CATDIR);
     48        psStringAppend (&getstarCommand, " -D CATDIR %s", CATDIR);
    5249    }
    5350
    54     // XXX set getstar in config?
     51    // psStringAppend (&getstarCommand, " -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
    5552    // XXX TEST : no magnitude limit
    56     // psStringAppend (&getstarLine, "/home/kiawe/eugene/psconfig/dev.lin64/bin/getstar %s -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", catformat, MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
    57     // psStringAppend (&getstarLine, "/home/kiawe/eugene/psconfig/dev.lin64/bin/getstar %s -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", catformat, MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
    58     psStringAppend (&getstarLine, "/home/kiawe/eugene/psconfig/dev.lin64/bin/getstar %s -D CATMODE mef -region %f %f %f %f -o %s", catformat, RAmin, DECmin, RAmax, DECmax, tempFile);
    59     psTrace ("psastro", 3, "%s\n", getstarLine);
     53    psStringAppend (&getstarCommand, " -D CATMODE mef -region %f %f %f %f -o %s", RAmin, DECmin, RAmax, DECmax, tempFile);
     54    psTrace ("psastro", 3, "%s\n", getstarCommand);
    6055
    6156    // XXX use psPipe: catch stderr, stdout, allow for Nsec timeout...
    62     status = system (getstarLine);
     57    status = system (getstarCommand);
    6358    if (status) {
    6459        psError(PSASTRO_ERR_REFSTARS, true, "error loading reference data\n");
    6560        return NULL;
    6661    }
    67     psFree (getstarLine);
    68     psFree (catformat);
     62    psFree (getstarCommand);
    6963
    7064    psLogMsg ("psastro", 3, "ran getstar : %f sec\n", psTimerMark ("psastro"));
Note: See TracChangeset for help on using the changeset viewer.