IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42709


Ignore:
Timestamp:
Jul 5, 2024, 12:26:38 PM (2 years ago)
Author:
eugene
Message:

add option to save cff output file in psastroTIO (use to convert cmf to cff)

Location:
branches/eam_branches/ipp-20230313/psastro/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/psastro/src/psastroTIODataSave.c

    r41895 r42709  
    4646    pmFPAfileActivate (config->files, false, NULL);
    4747    pmFPAfileActivate (config->files, true, "PSASTRO.OUTPUT");
     48    pmFPAfileActivate (config->files, true, "PSPHOT.OUTPUT.CFF");
    4849
    4950    pmFPAview *view = pmFPAviewAlloc (0);
  • branches/eam_branches/ipp-20230313/psastro/src/psastroTIOParseCamera.c

    r41895 r42709  
    3131    output->save = true;
    3232
     33    // check if the user wants CFF output
     34    {
     35      // select the current recipe
     36      psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE);
     37      if (!recipe) {
     38        psError(PSASTRO_ERR_CONFIG, false, "Can't find PSASTRO recipe!\n");
     39        return false;
     40      }
     41
     42      bool writeCff = psMetadataLookupBool (&status, recipe, "PSASTRO.SAVE.CFF");
     43      if (writeCff) {
     44        pmFPAfile *file = pmFPAfileDefineOutputFromFile  (config, input, "PSPHOT.OUTPUT.CFF");
     45        if (!file) {
     46          psError (PS_ERR_IO, false, "Can't find the output cff file definition");
     47          return NULL;
     48        }
     49        if (file->type != PM_FPA_FILE_CFF) {
     50          psError(PS_ERR_IO, true, "%s is not of type %s", "PSPHOT.OUTPUT.CFF", pmFPAfileStringFromType (PM_FPA_FILE_CFF));
     51          return NULL;
     52        }
     53        file->save = true;
     54      }
     55    }
    3356
    3457    // Chip selection: turn on only the chips specified (option is not required)
Note: See TracChangeset for help on using the changeset viewer.