Changeset 41620 for branches/eam_branches/relphot.20210521/src/bcatalog.c
- Timestamp:
- May 27, 2021, 11:41:52 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/relphot.20210521/src/bcatalog.c
r41603 r41620 35 35 ALLOCATE (Nvalid, int, Nsecfilt); 36 36 37 // flags used by the photometry analysis (excluding UBERCAL)38 unsigned int PHOTOM_FLAGS =39 ID_MEAS_NOCAL | // detection ignored for this analysis (photcode, time range)40 ID_MEAS_POOR_PHOTOM | // detection is photometry outlier41 ID_MEAS_SKIP_PHOTOM | // detection was ignored for photometry measurement42 ID_MEAS_AREA | // detetion was outside acceptable area of device43 ID_MEAS_SYNTH_MAG | // magnitude is synthetic44 ID_MEAS_STACK_PRIMARY | // this stack measurement is in the primary skycell45 ID_MEAS_STACK_PHOT_SRC | // this measurement supplied the stack photometry46 ID_MEAS_PHOTOM_PSF | // this measurement is used for the mean psf mag47 ID_MEAS_PHOTOM_APER | // this measurement is used for the mean ap mag48 ID_MEAS_PHOTOM_KRON ; // this measurement is used for the mean kron mag49 50 37 /* exclude stars not in range or with too few measurements */ 51 38 for (i = 0; i < catalog[0].Naverage; i++) { … … 61 48 } 62 49 63 // reset the calculated average magnitudes (does not affect ubercal-tied measurements or images) 64 if (RESET) { 65 int Ns; 66 67 for (Ns = 0; Ns < Nphotcodes; Ns++) { 68 69 int thisCode = photcodes[Ns][0].code; 70 int Nsec = GetPhotcodeNsec(thisCode); 71 72 dvo_secfilt_init (&subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec], SECFILT_RESET_ALL); 73 } 74 } 50 // reset the calculated average magnitudes for active photcode only 51 ResetAverageActivePhotcodes (&subcatalog[0].secfilt[Nsecfilt*Naverage]); 75 52 76 53 Nm = 0; … … 111 88 if (isnan(catalog[0].measure[offset].Mkron)) { Nnan ++; continue; } 112 89 113 // require 0x01 in photFlags (fitted with a PSF) 90 // require 0x01 in photFlags (fitted with a PSF) -- add to the test data 114 91 // XXX EAM : test is inconsistent -- fix if ((catalog[0].measure[offset].photFlags & 0x01) == 0) { Nbad ++; continue; } 115 92 … … 156 133 subcatalog[0].measureT[Nmeasure].dbFlags &= ~ID_MEAS_SKIP_PHOTOM; 157 134 subcatalog[0].measureT[Nmeasure].averef = Naverage; 158 if (RESET) { 159 // only reset Mcal for measures with a matching image 160 // do not reset Mcal for ubercal images unless explicitly requested 161 if (subcatalog[0].measureT[Nmeasure].dbFlags & ID_MEAS_PHOTOM_UBERCAL) { 162 if (!KEEP_UBERCAL) { 163 subcatalog[0].measureT[Nmeasure].McalPSF = 0.0; 164 subcatalog[0].measureT[Nmeasure].McalAPER = 0.0; 165 subcatalog[0].measureT[Nmeasure].dbFlags &= ~ID_MEAS_PHOTOM_UBERCAL; 166 } 167 } else { 168 if (getImageEntry (Nmeasure, Ncat) >= 0) { 169 subcatalog[0].measureT[Nmeasure].McalPSF = 0.0; 170 subcatalog[0].measureT[Nmeasure].McalAPER = 0.0; 171 } 172 } 173 subcatalog[0].measureT[Nmeasure].dbFlags &= ~PHOTOM_FLAGS; 174 } 135 ResetMeasureZeroPoints (&subcatalog[0].measureT[Nmeasure], Nmeasure, Ncat); 136 175 137 Nmeasure ++; 176 138 Nm ++;
Note:
See TracChangeset
for help on using the changeset viewer.
