Changeset 40291 for trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c
- Timestamp:
- Dec 13, 2017, 10:53:48 AM (9 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/libdvo/src/dvo_convert_loneos.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c
r38462 r40291 26 26 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 27 27 out[i].dM = (in[i].dM == NAN_U_CHAR) ? NAN : in[i].dM * 0.001; 28 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 28 out[i].McalPSF = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 29 out[i].McalAPER = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 29 30 out[i].Map = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 30 31 out[i].photcode = in[i].source; … … 59 60 out[i].M = isnan(in[i].M ) ? NAN_S_SHORT : in[i].M * 1000.0; 60 61 out[i].dM = isnan(in[i].dM ) ? NAN_U_CHAR : in[i].dM * 1000.0; 61 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal* 1000.0;62 out[i].Mcal = isnan(in[i].McalPSF) ? NAN_S_SHORT : in[i].McalPSF * 1000.0; 62 63 out[i].source = in[i].photcode; 63 64 out[i].t = in[i].t; … … 89 90 90 91 // changed for PANSTARRS_DEV_0 (moved from Average to Measure) 91 primary[0][i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001;92 primary[0][i].Mchisq = pow (10.0, 0.01*in[i].Xm);92 primary[0][i].MpsfChp = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 93 primary[0][i].Mchisq = pow (10.0, 0.01*in[i].Xm); 93 94 94 95 // added for PANSTARRS_DEV_0 … … 123 124 124 125 // changed for PANSTARRS_DEV_0 (moved from Average to Measure) 125 out[i].M = isnan(primary[i].M ) ? NAN_S_SHORT : primary[i].M* 1000.0;126 out[i].M = isnan(primary[i].MpsfChp) ? NAN_S_SHORT : primary[i].MpsfChp * 1000.0; 126 127 out[i].Xm = 100.0*log10(primary[i].Mchisq); 127 128 … … 152 153 153 154 // added or changed for PANSTARRS_DEV_0 154 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001;155 out[i].MpsfChp = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 155 156 } 156 157 return (out); … … 169 170 170 171 // added or changed for PANSTARRS_DEV_0 171 out[i].M = isnan(in[i].M ) ? NAN_S_SHORT : in[i].M* 1000.0;172 out[i].M = isnan(in[i].MpsfChp) ? NAN_S_SHORT : in[i].MpsfChp * 1000.0; 172 173 } 173 174 return (out); … … 202 203 out[i].NY = in[i].NY; 203 204 204 out[i].Xm = in[i].Xm;205 205 out[i].photcode = in[i].source; 206 206 out[i].exptime = in[i].exptime; … … 231 231 out[i].apmifit = (in[i].apmifit == NAN_S_SHORT) ? NAN : in[i].apmifit * 0.001; 232 232 out[i].dapmifit = (in[i].dapmifit == NAN_S_SHORT) ? NAN : in[i].dapmifit * 0.001; 233 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 233 234 out[i].McalPSF = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 235 out[i].McalAPER = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 234 236 out[i].dMcal = (in[i].dMcal == NAN_S_SHORT) ? NAN : in[i].dMcal * 0.001; 237 out[i].McalChiSq = (in[i].dMcal == NAN_S_SHORT) ? NAN : pow(10.0, 0.01*in[i].Xm); 238 235 239 out[i].sidtime = NAN; 236 240 out[i].latitude = NAN; … … 274 278 out[i].NY = in[i].NY; 275 279 276 out[i].Xm = in[i].Xm;277 280 out[i].source = in[i].photcode; 278 281 out[i].exptime = in[i].exptime; … … 303 306 out[i].apmifit = isnan(in[i].apmifit ) ? NAN_S_SHORT : in[i].apmifit * 1000.0; 304 307 out[i].dapmifit = isnan(in[i].dapmifit) ? NAN_S_SHORT : in[i].dapmifit * 1000.0; 305 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal * 1000.0; 308 309 out[i].Mcal = isnan(in[i].McalPSF ) ? NAN_S_SHORT : in[i].McalPSF * 1000.0; 306 310 out[i].dMcal = isnan(in[i].dMcal ) ? NAN_S_SHORT : in[i].dMcal * 1000.0; 311 out[i].Xm = isnan(in[i].dMcal ) ? NAN_S_SHORT : 100.0*log10(in[i].McalChiSq); 307 312 308 313 // changed or added for PS1_V1
Note:
See TracChangeset
for help on using the changeset viewer.
