IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17039


Ignore:
Timestamp:
Mar 18, 2008, 8:39:38 AM (18 years ago)
Author:
eugene
Message:

add option to output refstars

File:
1 edited

Legend:

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

    r15891 r17039  
    2929    }
    3030    if (fixChips || useModel) {
    31         if (!psastroDefineFile (config, input->fpa, "PSASTRO.MODEL", "ASTROM.MODEL", PM_FPA_FILE_ASTROM, PM_DETREND_TYPE_ASTROM)) {
     31        if (!psastroDefineFile (config, input->fpa, "PSASTRO.MODEL", "ASTROM.MODEL", PM_FPA_FILE_ASTROM_MODEL, PM_DETREND_TYPE_ASTROM)) {
    3232            psError (PS_ERR_IO, false, "Can't find an astrometry model file");
    3333            return NULL;
    3434        }
    3535    }
     36
     37    bool saveRefstars = psMetadataLookupBool (&status, config->arguments, "PSASTRO.SAVE.REFSTARS");
     38    if (!status) {
     39      saveRefstars = psMetadataLookupBool (&status, recipe, "PSASTRO.SAVE.REFSTARS");
     40    }
     41    if (saveRefstars) {
     42        // look for the file in the camera config table
     43        pmFPAfile *file = pmFPAfileDefineFromConf  (&status, config, "PSASTRO.REFSTARS");
     44        if (!status) {
     45            psError (PS_ERR_IO, false, "Can't find the astrometry refstars file definition");
     46            return NULL;
     47        }
     48        if (file->type != PM_FPA_FILE_ASTROM_REFSTARS) {
     49            psError(PS_ERR_IO, true, "%s is not of type %s", "PSASTRO.REFSTARS", pmFPAfileStringFromType (PM_FPA_FILE_ASTROM_REFSTARS));
     50            return NULL;
     51        }
     52    }
     53
    3654
    3755# if (0)
Note: See TracChangeset for help on using the changeset viewer.