Changeset 17826 for trunk/psModules/src/objects/pmSourceIO.c
- Timestamp:
- May 28, 2008, 8:57:01 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceIO.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO.c
r17635 r17826 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.5 7$ $Name: not supported by cvs2svn $6 * @date $Date: 2008-05- 12 21:52:18$5 * @version $Revision: 1.58 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2008-05-28 18:57:01 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 258 258 259 259 // XXX if sources is NULL, skip the cell or write out empty tables? 260 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 260 // XXX if we use the file->name here, then we can use different pmFPAfiles for source output 261 psArray *sources = psMetadataLookupPtr (&status, readout->analysis, file->name); 261 262 if (!sources) { 262 263 sources = psArrayAlloc(0); 263 psMetadataAddArray(readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE, 264 "Blank array of sources", sources); 265 psFree(sources); // Held onto by the metadata, so we can continue to use 264 psMetadataAddArray(readout->analysis, PS_LIST_TAIL, file->name, PS_META_REPLACE, "Blank array of sources", sources); 265 psFree(sources); // Held onto by the metadata, so we can continue to use 266 266 } 267 267 … … 872 872 } 873 873 readout->data_exists = true; 874 status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources);874 status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, file->name, 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 );888 bool exists = pmFPACheckDataStatusForSources (fpa, name); 889 889 return exists; 890 890 } … … 896 896 897 897 if (view->cell == -1) { 898 bool exists = pmChipCheckDataStatusForSources (chip );898 bool exists = pmChipCheckDataStatusForSources (chip, name); 899 899 return exists; 900 900 } … … 906 906 907 907 if (view->readout == -1) { 908 bool exists = pmCellCheckDataStatusForSources (cell );908 bool exists = pmCellCheckDataStatusForSources (cell, name); 909 909 return exists; 910 910 } … … 916 916 pmReadout *readout = cell->readouts->data[view->readout]; 917 917 918 bool exists = pmReadoutCheckDataStatusForSources (readout );918 bool exists = pmReadoutCheckDataStatusForSources (readout, file->name); 919 919 return exists; 920 920 } 921 921 922 bool pmFPACheckDataStatusForSources (const pmFPA *fpa )922 bool pmFPACheckDataStatusForSources (const pmFPA *fpa, const char *name) 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 )) return true;930 if (pmChipCheckDataStatusForSources (chip, name)) return true; 931 931 } 932 932 return false; 933 933 } 934 934 935 bool pmChipCheckDataStatusForSources (const pmChip *chip )935 bool pmChipCheckDataStatusForSources (const pmChip *chip, const char *name) 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 )) return true;943 if (pmCellCheckDataStatusForSources (cell, name)) return true; 944 944 } 945 945 return false; 946 946 } 947 947 948 bool pmCellCheckDataStatusForSources (const pmCell *cell )948 bool pmCellCheckDataStatusForSources (const pmCell *cell, const char *name) 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 )) return true;956 if (pmReadoutCheckDataStatusForSources (readout, name)) return true; 957 957 } 958 958 return false; 959 959 } 960 960 961 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout )961 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout, const char *name) 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, "PSPHOT.SOURCES");968 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, name); 969 969 if (!psf) return false; 970 970 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
