Changeset 17850 for trunk/psModules/src/objects
- Timestamp:
- May 29, 2008, 3:26:03 AM (18 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
pmSourceIO.c (modified) (11 diffs)
-
pmSourceIO.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO.c
r17832 r17850 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 59$ $Name: not supported by cvs2svn $6 * @date $Date: 2008-05-2 8 21:48:49$5 * @version $Revision: 1.60 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-05-29 13:25:35 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 257 257 char *headname = NULL; 258 258 259 // XXX if sources is NULL, skip the cell or write out empty tables?260 // XXX if we use the file->name here, then we can use different pmFPAfiles for source output261 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, file->name);259 // if sources is NULL, write out an empty table 260 // input / output sources are stored on the readout->analysis as "PSPHOT.SOURCES" -- a better name might be something like PM_SOURCE_DATA 261 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 262 262 if (!sources) { 263 263 sources = psArrayAlloc(0); 264 psMetadataAddArray(readout->analysis, PS_LIST_TAIL, file->name, PS_META_REPLACE, "Blank array of sources", sources);264 psMetadataAddArray(readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE, "Blank array of sources", sources); 265 265 psFree(sources); // Held onto by the metadata, so we can continue to use 266 266 } … … 872 872 } 873 873 readout->data_exists = true; 874 status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, file->name, PS_DATA_ARRAY, "input sources", sources);874 status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "input sources", sources); 875 875 psFree (sources); 876 876 return true; … … 886 886 887 887 if (view->chip == -1) { 888 bool exists = pmFPACheckDataStatusForSources (fpa , file->name);888 bool exists = pmFPACheckDataStatusForSources (fpa); 889 889 return exists; 890 890 } … … 896 896 897 897 if (view->cell == -1) { 898 bool exists = pmChipCheckDataStatusForSources (chip , file->name);898 bool exists = pmChipCheckDataStatusForSources (chip); 899 899 return exists; 900 900 } … … 906 906 907 907 if (view->readout == -1) { 908 bool exists = pmCellCheckDataStatusForSources (cell , file->name);908 bool exists = pmCellCheckDataStatusForSources (cell); 909 909 return exists; 910 910 } … … 916 916 pmReadout *readout = cell->readouts->data[view->readout]; 917 917 918 bool exists = pmReadoutCheckDataStatusForSources (readout , file->name);918 bool exists = pmReadoutCheckDataStatusForSources (readout); 919 919 return exists; 920 920 } 921 921 922 bool pmFPACheckDataStatusForSources (const pmFPA *fpa , const char *name)922 bool pmFPACheckDataStatusForSources (const pmFPA *fpa) 923 923 { 924 924 PS_ASSERT_PTR_NON_NULL(fpa, false); … … 928 928 pmChip *chip = fpa->chips->data[i]; 929 929 if (!chip) continue; 930 if (pmChipCheckDataStatusForSources (chip , name)) return true;930 if (pmChipCheckDataStatusForSources (chip)) return true; 931 931 } 932 932 return false; 933 933 } 934 934 935 bool pmChipCheckDataStatusForSources (const pmChip *chip , const char *name)935 bool pmChipCheckDataStatusForSources (const pmChip *chip) 936 936 { 937 937 PS_ASSERT_PTR_NON_NULL(chip, false); … … 941 941 pmCell *cell = chip->cells->data[i]; 942 942 if (!cell) continue; 943 if (pmCellCheckDataStatusForSources (cell , name)) return true;943 if (pmCellCheckDataStatusForSources (cell)) return true; 944 944 } 945 945 return false; 946 946 } 947 947 948 bool pmCellCheckDataStatusForSources (const pmCell *cell , const char *name)948 bool pmCellCheckDataStatusForSources (const pmCell *cell) 949 949 { 950 950 PS_ASSERT_PTR_NON_NULL(cell, false); … … 954 954 pmReadout *readout = cell->readouts->data[i]; 955 955 if (!readout) continue; 956 if (pmReadoutCheckDataStatusForSources (readout , name)) return true;956 if (pmReadoutCheckDataStatusForSources (readout)) return true; 957 957 } 958 958 return false; 959 959 } 960 960 961 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout , const char *name)961 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout) 962 962 { 963 963 PS_ASSERT_PTR_NON_NULL(readout, false); … … 966 966 967 967 // select the psf of interest 968 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, name);968 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 969 969 if (!psf) return false; 970 970 return true; -
trunk/psModules/src/objects/pmSourceIO.h
r17832 r17850 4 4 * @author EAM, IfA; GLG, MHPCC 5 5 * 6 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $7 * @date $Date: 2008-05-2 8 21:48:49$6 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-05-29 13:25:38 $ 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 9 9 * … … 57 57 58 58 bool pmFPAviewCheckDataStatusForSources (const pmFPAview *view, const pmFPAfile *file); 59 bool pmFPACheckDataStatusForSources (const pmFPA *fpa , const char *name);60 bool pmChipCheckDataStatusForSources (const pmChip *chip , const char *name);61 bool pmCellCheckDataStatusForSources (const pmCell *cell , const char *name);62 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout , const char *name);59 bool pmFPACheckDataStatusForSources (const pmFPA *fpa); 60 bool pmChipCheckDataStatusForSources (const pmChip *chip); 61 bool pmCellCheckDataStatusForSources (const pmCell *cell); 62 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout); 63 63 64 64 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
