- Timestamp:
- Mar 29, 2009, 6:15:31 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
psModules (modified) (1 prop)
-
psModules/src/config/pmConfig.c (modified) (1 diff)
-
psModules/src/config/pmConfigCamera.c (modified) (2 diffs)
-
psModules/src/config/pmConfigMask.c (modified) (1 diff)
-
psModules/src/config/pmConfigRun.c (modified) (4 diffs)
-
psModules/src/config/pmConfigRun.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
branches/cnb_branches/cnb_branch_20090301/psModules
- Property svn:mergeinfo changed
/trunk/psModules merged: 23354,23358,23370,23374,23378,23404-23405,23428,23432,23447,23450-23452,23476,23487,23498,23535,23574,23576-23577,23587
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfig.c
r23351 r23594 806 806 pmConfigLoadRecipeOptions(argc, argv, config, "-Df"); 807 807 pmConfigLoadRecipeOptions(argc, argv, config, "-Db"); 808 809 if (!pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CL)) { 810 psError(PS_ERR_IO, false, "Failed to read recipes from command-line"); 811 psFree(config); 812 return NULL; 813 } 808 814 809 815 // Look for command-line options for files to replace -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigCamera.c
r23351 r23594 159 159 // Don't update these skycell concepts; last one MUST be 0 (i.e., NULL). 160 160 const static char *skycellConceptsCell[] = { "CELL.BIASSEC", "CELL.TRIMSEC", "CELL.READDIR", "CELL.XPARITY", 161 "CELL.YPARITY", "CELL.X0", "CELL.Y0", 0 };161 "CELL.YPARITY", "CELL.X0", "CELL.Y0", "CELL.TIMESYS", 0 }; 162 162 const static char *skycellConceptsChip[] = { "CHIP.XPARITY", "CHIP.YPARITY", 0 }; 163 const static char *skycellConceptsFPA[] = { 0};163 const static char *skycellConceptsFPA[] = { "FPA.TIMESYS" }; 164 164 165 165 // What do we call the skycell concept in the FITS header? … … 332 332 psMetadataAddS32(defaults, PS_LIST_TAIL, "CHIP.X0", 0, NULL, 0); 333 333 psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.READDIR", 0, "Read direction (rows)", 1); 334 psMetadataAddStr(defaults, PS_LIST_TAIL, "CELL.TIMESYS", 0, "Time system", "TAI"); 335 psMetadataAddStr(defaults, PS_LIST_TAIL, "FPA.TIMESYS", 0, "Time system", "TAI"); 334 336 335 337 psMetadataAddMetadata(format, PS_LIST_TAIL, "DEFAULTS", 0, "Default values for concepts", defaults); -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigMask.c
r21386 r23594 10 10 11 11 static pmConfigMaskInfo masks[] = { 12 { "DETECTOR", NULL, 0x00, true }, // Something is wrong with the detector 13 { "DARK", "DETECTOR", 0x00, true }, // Pixel doesn't dark-subtract properly 14 { "FLAT", "DETECTOR", 0x01, true }, // Pixel doesn't flat-field properly 15 { "BLANK", "DETECTOR", 0x01, true }, // Pixel doesn't contain valid data 16 { "RANGE", NULL, 0x00, true }, // Pixel is out-of-range of linearity 17 { "SAT", "RANGE", 0x01, true }, // Pixel is saturated 18 { "BAD", "RANGE", 0x01, true }, // Pixel is low 19 { "BAD.WARP", NULL, 0x01, true }, // Pixel is bad after convolution with a bad pixel 20 { "CR", NULL, 0x00, true }, // Pixel contains a cosmic ray 21 { "GHOST", NULL, 0x00, true }, // Pixel contains an optical ghost 22 { "POOR.WARP", NULL, 0x00, false }, // Pixel is poor after convolution with a bad pixel 23 // "LOW" Pixel is low 24 // "CONV" Pixel is bad after convolution with a bad pixel 12 // Features of the detector 13 { "DETECTOR", NULL, 0x01, true }, // Something is wrong with the detector 14 { "FLAT", "DETECTOR", 0x01, true }, // Pixel doesn't flat-field properly 15 { "DARK", "DETECTOR", 0x01, true }, // Pixel doesn't dark-subtract properly 16 { "BLANK", "DETECTOR", 0x01, true }, // Pixel doesn't contain valid data 17 { "CTE", "DETECTOR", 0x01, true }, // Pixel has poor CTE 18 // Invalid signal ranges 19 { "SAT", NULL, 0x02, true }, // Pixel is saturated or non-linear 20 { "LOW", "SAT", 0x02, true }, // Pixel is low 21 { "SUSPECT", NULL, 0x04, false }, // Pixel is suspected of being bad 22 // Non-astronomical structures 23 { "CR", NULL, 0x08, true }, // Pixel contains a cosmic ray 24 { "SPIKE", NULL, 0x08, true }, // Pixel contains a diffraction spike 25 { "GHOST", NULL, 0x08, true }, // Pixel contains an optical ghost 26 { "STREAK", NULL, 0x08, true }, // Pixel contains streak data 27 { "STARCORE", NULL, 0x08, true }, // Pixel contains a bright star core 28 // Effects of convolution and interpolation 29 { "CONV.BAD", NULL, 0x02, true }, // Pixel is bad after convolution with a bad pixel 30 { "CONV.POOR", NULL, 0x04, false }, // Pixel is poor after convolution with a bad pixel 25 31 }; 26 32 -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRun.c
r23351 r23594 39 39 } 40 40 41 42 bool pmConfigRunFileAdd(pmConfig *config, const pmFPAfile *file) 41 // Add a file to a nominated metadata in the RUN information 42 static bool configRunFileAdd(pmConfig *config, // Configuration 43 const pmFPAfile *file, // File to add 44 const char *target // Name of metadata to which to add 45 ) 43 46 { 44 47 PS_ASSERT_PTR_NON_NULL(config, false); … … 47 50 psMetadata *run = configRun(config);// RUN information 48 51 psAssert(run, "Require run-time information"); 49 psMetadata *files = configElement(run, "FILES", "Filerules used during execution");52 psMetadata *files = configElement(run, target, "Filerules used during execution"); 50 53 psAssert(files, "Require list of files"); 51 54 … … 71 74 } 72 75 73 psArray *pmConfigRunFileGet(pmConfig *config, const char *name)76 bool pmConfigRunFileAddRead(pmConfig *config, const pmFPAfile *file) 74 77 { 75 78 PS_ASSERT_PTR_NON_NULL(config, false); 76 PS_ASSERT_ STRING_NON_EMPTY(name, false);79 PS_ASSERT_PTR_NON_NULL(file, false); 77 80 81 return configRunFileAdd(config, file, "FILES.INPUT"); 82 } 83 84 bool pmConfigRunFileAddWrite(pmConfig *config, const pmFPAfile *file) 85 { 86 PS_ASSERT_PTR_NON_NULL(config, false); 87 PS_ASSERT_PTR_NON_NULL(file, false); 88 89 return configRunFileAdd(config, file, "FILES.OUTPUT"); 90 } 91 92 // Get an array of filenames from the nominated RUN information 93 static psArray *configRunFileGet(pmConfig *config, // Configuration 94 const char *name, // Name of file 95 const char *source // Source metadata for file 96 ) 97 { 78 98 psMetadata *run = configRun(config);// RUN information 79 99 psAssert(run, "Require run-time information"); 80 psMetadata *files = configElement(run, "FILES", "Filerules used during execution");100 psMetadata *files = configElement(run, source, "Filerules used during execution"); 81 101 psAssert(files, "Require list of files"); 102 103 if (psListLength(files->list) == 0) { 104 // Can't find anything 105 return NULL; 106 } 82 107 83 108 psList *list = psListAlloc(NULL); // List of file names … … 104 129 105 130 return array; 131 } 132 133 134 psArray *pmConfigRunFileGet(pmConfig *config, const char *name) 135 { 136 PS_ASSERT_PTR_NON_NULL(config, false); 137 PS_ASSERT_STRING_NON_EMPTY(name, false); 138 139 // Try the input and output, in turn 140 psArray *files = configRunFileGet(config, name, "FILES.INPUT"); // Files from RUN metadata 141 if (!files) { 142 configRunFileGet(config, name, "FILES.OUTPUT"); 143 } 144 145 return files; 106 146 } 107 147 -
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigRun.h
r23351 r23594 6 6 #include <pmFPAfile.h> 7 7 8 /// Add a file to the list of files used in the run-time information 9 bool pmConfigRunFileAdd( 8 /// Add a file to the list of files read in the run-time information 9 bool pmConfigRunFileAddRead( 10 pmConfig *config, ///< Configuration 11 const pmFPAfile *file ///< File to add 12 ); 13 14 /// Add a file to the list of files written in the run-time information 15 bool pmConfigRunFileAddWrite( 10 16 pmConfig *config, ///< Configuration 11 17 const pmFPAfile *file ///< File to add
Note:
See TracChangeset
for help on using the changeset viewer.
