Changeset 13931 for trunk/psModules/src/camera/pmFPAfileDefine.c
- Timestamp:
- Jun 21, 2007, 12:45:27 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r13897 r13931 94 94 95 95 // Define an output pmFPAfile 96 static pmFPAfile *fpaFileDefineOutput(const pmConfig *config, // Configuration97 pmFPA *fpa, // Optional FPA to bind98 const char *name, // Name of file rule99 const char *cameraName, // Name of camera configuration to use100 const char *formatName // Name of camera format to use96 pmFPAfile *pmFPAfileDefineOutputForFormat(const pmConfig *config, // Configuration 97 pmFPA *fpa, // Optional FPA to bind 98 const char *name, // Name of file rule 99 const char *cameraName, // Name of camera configuration to use 100 const char *formatName // Name of camera format to use 101 101 ) 102 102 { … … 257 257 PS_ASSERT_STRING_NON_EMPTY(name, NULL); 258 258 259 return fpaFileDefineOutput(config, fpa, name, NULL, NULL);259 return pmFPAfileDefineOutputForFormat(config, fpa, name, NULL, NULL); 260 260 } 261 261 … … 472 472 } 473 473 474 // XXX this hack should now not be needed: the PSF is stored in a MEF fits table file475 # if (0)476 // XXX temporary hack : force PSF input onto filename477 // XXX EAM : I need to define a PSF container which specifies the chip/cell element478 // XXX we could use the flat metadata style IF we restrict it to SIMPLE cameras479 // XXX (ie, one readout per cell, one cell per chip, one chip per fpa)480 if (file->type == PM_FPA_FILE_PSF) {481 file->filerule = psStringCopy (infiles->data[0]);482 if (found) {483 *found = true;484 }485 return file;486 }487 # endif488 489 474 // set derived values 490 475 file->fileLevel = input->fileLevel; … … 979 964 strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0) { 980 965 // The input camera is already a skycell 981 file = fpaFileDefineOutput(config, fpa, filename, config->cameraName, "SKYCELL");966 file = pmFPAfileDefineOutputForFormat(config, fpa, filename, config->cameraName, "SKYCELL"); 982 967 } else { 983 968 psString cameraName = NULL; // Name of the old camera configuration … … 993 978 psString newCameraName = NULL; // Name of the new (automatically-generated) camera configuration 994 979 psStringAppend(&newCameraName, "_%s-SKYCELL", cameraName); 995 file = fpaFileDefineOutput(config, fpa, filename, newCameraName, "SKYCELL");980 file = pmFPAfileDefineOutputForFormat(config, fpa, filename, newCameraName, "SKYCELL"); 996 981 psFree(cameraName); 997 982 psFree(newCameraName); 983 } 984 if (!file) { 985 psErrorStackPrint(stderr, "file %s not defined\n", filename); 986 return NULL; 998 987 } 999 988 … … 1018 1007 strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0) { 1019 1008 // The input camera has already been mosaicked to this level 1020 file = fpaFileDefineOutput(config, NULL, filename, config->cameraName, config->formatName);1009 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, config->cameraName, config->formatName); 1021 1010 } else { 1022 1011 psString cameraName = NULL; // Name of the new (automatically-generated) camera configuration … … 1024 1013 1025 1014 // Find the correct camera configuration 1026 file = fpaFileDefineOutput(config, NULL, filename, cameraName, config->formatName);1015 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, cameraName, config->formatName); 1027 1016 psFree(cameraName); 1017 } 1018 if (!file) { 1019 psErrorStackPrint(stderr, "file %s not defined\n", filename); 1020 return NULL; 1028 1021 } 1029 1022 … … 1046 1039 strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0) { 1047 1040 // The input camera has already been mosaicked to this level 1048 file = fpaFileDefineOutput(config, NULL, filename, config->cameraName, config->formatName);1041 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, config->cameraName, config->formatName); 1049 1042 } else { 1050 1043 … … 1061 1054 psFree(original); 1062 1055 1063 file = fpaFileDefineOutput(config, NULL, filename, cameraName, config->formatName);1056 file = pmFPAfileDefineOutputForFormat(config, NULL, filename, cameraName, config->formatName); 1064 1057 psFree(cameraName); 1058 } 1059 if (!file) { 1060 psErrorStackPrint(stderr, "file %s not defined\n", filename); 1061 return NULL; 1065 1062 } 1066 1063
Note:
See TracChangeset
for help on using the changeset viewer.
