Changeset 40291 for trunk/Ohana/src/libdvo/src/dvo_convert_elixir.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_elixir.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c
r38462 r40291 24 24 out[i].dM = (in[i].dM == NAN_U_CHAR) ? NAN : in[i].dM * 0.001; 25 25 out[i].dt = (in[i].dt == NAN_S_SHORT) ? NAN : in[i].dt * 0.001; 26 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 26 out[i].McalPSF = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 27 out[i].McalAPER = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 27 28 out[i].Map = (in[i].Mgal == NAN_S_SHORT) ? NAN : in[i].Mgal * 0.001; 28 29 out[i].airmass = (in[i].airmass == NAN_S_SHORT) ? NAN : in[i].airmass* 0.001; … … 72 73 out[i].dM = isnan(in[i].dM ) ? NAN_U_CHAR : in[i].dM * 1000.0; 73 74 out[i].dt = isnan(in[i].dt ) ? NAN_S_SHORT : in[i].dt * 1000.0; 74 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal* 1000.0;75 out[i].Mcal = isnan(in[i].McalPSF) ? NAN_S_SHORT : in[i].McalPSF * 1000.0; 75 76 out[i].Mgal = isnan(in[i].Map ) ? NAN_S_SHORT : in[i].Map * 1000.0; 76 77 out[i].airmass = isnan(in[i].airmass) ? NAN_S_SHORT : in[i].airmass * 1000.0; … … 109 110 110 111 // changed for PANSTARRS_DEV_0 (moved from Average to Measure) 111 primary[0][i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001;112 primary[0][i].dM = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001;112 primary[0][i].MpsfChp = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 113 primary[0][i].dMpsfChp = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001; 113 114 primary[0][i].Mchisq= pow (10.0, 0.01*in[i].Xm); 114 115 … … 142 143 143 144 // changed for PANSTARRS_DEV_0 (moved from Average to Measure) 144 out[i].M = isnan(primary[i].M ) ? NAN_S_SHORT : primary[i].M* 1000.0;145 out[i].dM = isnan(primary[i].dM ) ? NAN_S_SHORT : primary[i].dM* 1000.0;145 out[i].M = isnan(primary[i].MpsfChp) ? NAN_S_SHORT : primary[i].MpsfChp * 1000.0; 146 out[i].dM = isnan(primary[i].dMpsfChp) ? NAN_S_SHORT : primary[i].dMpsfChp * 1000.0; 146 147 out[i].Xm = 100.0*log10(primary[i].Mchisq); 147 148 … … 172 173 173 174 // added or changed for PANSTARRS_DEV_0 174 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001;175 out[i].dM = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001;175 out[i].MpsfChp = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 176 out[i].dMpsfChp = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001; 176 177 } 177 178 return (out); … … 190 191 191 192 // added or changed for PANSTARRS_DEV_0 192 out[i].M = isnan(in[i].M ) ? NAN_S_SHORT : in[i].M* 1000.0;193 out[i].dM = isnan(in[i].dM ) ? NAN_S_SHORT : in[i].dM* 1000.0;193 out[i].M = isnan(in[i].MpsfChp) ? NAN_S_SHORT : in[i].MpsfChp * 1000.0; 194 out[i].dM = isnan(in[i].dMpsfChp) ? NAN_S_SHORT : in[i].dMpsfChp * 1000.0; 194 195 } 195 196 return (out); … … 223 224 out[i].NX = in[i].NX; 224 225 out[i].NY = in[i].NY; 225 out[i].Xm = in[i].Xm;226 226 out[i].photcode = in[i].source; 227 227 out[i].exptime = in[i].exptime; … … 252 252 out[i].apmifit = (in[i].apmifit == NAN_S_SHORT) ? NAN : in[i].apmifit * 0.001; 253 253 out[i].dapmifit = (in[i].dapmifit == NAN_S_SHORT) ? NAN : in[i].dapmifit * 0.001; 254 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 254 255 out[i].McalPSF = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 256 out[i].McalAPER = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 255 257 out[i].dMcal = (in[i].dMcal == NAN_S_SHORT) ? NAN : in[i].dMcal * 0.001; 258 out[i].McalChiSq = (in[i].dMcal == NAN_S_SHORT) ? NAN : pow(10.0, 0.01*in[i].Xm); 259 256 260 out[i].sidtime = NAN; 257 261 out[i].latitude = NAN; … … 295 299 out[i].NY = in[i].NY; 296 300 297 out[i].Xm = in[i].Xm;298 301 out[i].source = in[i].photcode; 299 302 out[i].exptime = in[i].exptime; … … 324 327 out[i].apmifit = isnan(in[i].apmifit ) ? NAN_S_SHORT : in[i].apmifit * 1000.0; 325 328 out[i].dapmifit = isnan(in[i].dapmifit) ? NAN_S_SHORT : in[i].dapmifit * 1000.0; 326 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal * 1000.0; 329 330 out[i].Mcal = isnan(in[i].McalPSF ) ? NAN_S_SHORT : in[i].McalPSF * 1000.0; 327 331 out[i].dMcal = isnan(in[i].dMcal ) ? NAN_S_SHORT : in[i].dMcal * 1000.0; 332 out[i].Xm = isnan(in[i].dMcal ) ? NAN_S_SHORT : 100.0*log10(in[i].McalChiSq); 328 333 329 334 // changed or added for PS1_V1
Note:
See TracChangeset
for help on using the changeset viewer.
