Changeset 15511
- Timestamp:
- Nov 8, 2007, 10:43:14 AM (19 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 12 edited
-
libautocode/def/average-panstarrs-dev-0.d (modified) (2 diffs)
-
libautocode/def/average-panstarrs-dev-1.d (modified) (1 diff)
-
libautocode/def/average-ps1-dev-1.d (modified) (2 diffs)
-
libautocode/def/average.d (modified) (2 diffs)
-
libautocode/def/measure-panstarrs-dev-0.d (modified) (4 diffs)
-
libautocode/def/measure-panstarrs-dev-1.d (modified) (4 diffs)
-
libautocode/def/measure-ps1-dev-1.d (modified) (2 diffs)
-
libautocode/def/measure.d (modified) (4 diffs)
-
libdvo/src/dvo_convert_elixir.c (modified) (11 diffs)
-
libdvo/src/dvo_convert_loneos.c (modified) (9 diffs)
-
libdvo/src/dvo_convert_panstarrs_DEV_0.c (modified) (4 diffs)
-
libdvo/src/dvo_convert_panstarrs_DEV_1.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libautocode/def/average-panstarrs-dev-0.d
r15034 r15511 19 19 FIELD dP, PAR_ERR, float, parallax error, arcsec 20 20 21 # XXX drop the old primary magnitude concept22 # FIELD M, MAG, float, primary mag, mag23 # FIELD dM, MAG_ERR, float, error on primary mag, mag24 # FIELD Xm, CHISQ_MAG, short, chisq for primary mag, [100*log(value)]25 # FIELD Xg, CHISQ_GAL, short, chisq for galaxy mags, [100*log(value)]26 27 21 FIELD Xp, SIGMA_POS, short, position scatter, 1/100 arcsec 28 22 FIELD Nm, NMEAS, unsigned short, number of measures … … 41 35 # the index for the secfilt table is just Nsecfilt times the index for the average table. 42 36 43 # XXX after the rest of the DVO re-org work, remove the magnitude based values from this table44 # and move them to the secfilt table.45 46 37 # the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs 47 38 # probably need to add position chisq -
trunk/Ohana/src/libautocode/def/average-panstarrs-dev-1.d
r15510 r15511 35 35 # the index for the secfilt table is just Nsecfilt times the index for the average table. 36 36 37 # XXX after the rest of the DVO re-org work, remove the magnitude based values from this table38 # and move them to the secfilt table.39 40 37 # the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs 41 38 # probably need to add position chisq -
trunk/Ohana/src/libautocode/def/average-ps1-dev-1.d
r15034 r15511 19 19 FIELD dP, PAR_ERR, float, parallax error, arcsec 20 20 21 # XXX drop the old primary magnitude concept22 # FIELD M, MAG, float, primary mag, mag23 # FIELD dM, MAG_ERR, float, error on primary mag, mag24 # FIELD Xm, CHISQ_MAG, short, chisq for primary mag, [100*log(value)]25 # FIELD Xg, CHISQ_GAL, short, chisq for galaxy mags, [100*log(value)]26 27 21 FIELD Xp, SIGMA_POS, short, position scatter, 1/100 arcsec 28 22 FIELD Nm, NMEAS, unsigned short, number of measures … … 41 35 # the index for the secfilt table is just Nsecfilt times the index for the average table. 42 36 43 # XXX after the rest of the DVO re-org work, remove the magnitude based values from this table44 # and move them to the secfilt table.45 46 37 # the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs 47 38 # probably need to add position chisq -
trunk/Ohana/src/libautocode/def/average.d
r14401 r15511 30 30 FIELD objID_lo, OBJ_ID_LO, unsigned int, ID lower bytes 31 31 32 # XXX record the number of detections used for average astrometry33 34 32 # this structure should only be used for internal representations 35 33 # the average-FORMAT structures should be used for external representations … … 37 35 # the index for the secfilt table is just Nsecfilt times the index for the average table. 38 36 39 # XXX after the rest of the DVO re-org work, remove the magnitude based values from this table40 # and move them to the secfilt table.41 42 37 # the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs 43 38 # probably need to add position chisq -
trunk/Ohana/src/libautocode/def/measure-panstarrs-dev-0.d
r15034 r15511 8 8 FIELD dD, D_DEC, float, DEC offset, arcsec 9 9 FIELD M, MAG, float, catalog mag, mag 10 FIELD Mcal, M cal,float, image cal mag, mag11 FIELD Mgal, M gal,float, galaxy mag, mag12 FIELD dM, dM,float, mag error, mag13 FIELD dt, dt,float, exposure time, 2.5*log(exptime)10 FIELD Mcal, M_CAL, float, image cal mag, mag 11 FIELD Mgal, M_GAL, float, galaxy mag, mag 12 FIELD dM, MAG_ERR, float, mag error, mag 13 FIELD dt, M_TIME, float, exposure time, 2.5*log(exptime) 14 14 15 15 # note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation 16 FIELD airmass, airmass, float, (airmass - 1), airmass16 FIELD airmass, AIRMASS, float, (airmass - 1), airmass 17 17 FIELD az, AZ, float, telescope azimuth 18 18 … … 25 25 FIELD dSky, SKY_FLUX_ERR, float, local estimate of sky flux, counts/sec 26 26 27 FIELD t, t,unsigned int, time in seconds (UNIX)28 FIELD averef, averef,unsigned int, reference to average entry27 FIELD t, TIME, unsigned int, time in seconds (UNIX) 28 FIELD averef, AVE_REF, unsigned int, reference to average entry 29 29 30 30 # Pan-STARRS uses a 64-bit detection ID. keep this in two 32 bit ints for backwards compatibility? … … 35 35 FIELD imageID_lo, IMAGE_ID_LO, unsigned int, reference to image 36 36 37 FIELD FWx, FW x,short, object fwhm major axis, 1/100 of arcsec38 FIELD FWy, FW y,short, object fwhm minor axis, 1/100 of arcsec39 FIELD theta, theta,short, angle wrt ccd X dir, (0xffff/360) deg40 FIELD photcode, photcode, unsigned short, photcode37 FIELD FWx, FWHM_MAJOR, short, object fwhm major axis, 1/100 of arcsec 38 FIELD FWy, FWHM_MINOR, short, object fwhm minor axis, 1/100 of arcsec 39 FIELD theta, PSF_THETA, short, angle wrt ccd X dir, (0xffff/360) deg 40 FIELD photcode, PHOTCODE, unsigned short, photcode 41 41 42 FIELD flags, flags, unsigned short, flags for various uses42 FIELD flags, FLAGS, unsigned short, flags for various uses 43 43 44 44 FIELD dXccd, X_CCD_ERR, short, X coord error on chip, pixels … … 48 48 FIELD qPSF, PSF_QF, short, psf coverage/quality factor 49 49 50 FIELD dophot, dophot, char, dophot type51 FIELD stargal, stargal,char, star-galaxy separator50 FIELD dophot, DOPHOT, char, dophot type 51 FIELD stargal, STAR_GAL, char, star-galaxy separator 52 52 53 53 # we need extra bytes for padding purposes... 54 FIELD dummy, dummy, char[2], padding 55 56 # float : 13 x 4 = 52 57 # int: 6 x 4 = 24 58 # short: 8 x 2 = 16 59 # char : 2 = 2 54 FIELD dummy, DUMMY, char[2], padding -
trunk/Ohana/src/libautocode/def/measure-panstarrs-dev-1.d
r15034 r15511 8 8 FIELD dD, D_DEC, float, DEC offset, arcsec 9 9 FIELD M, MAG, float, catalog mag, mag 10 FIELD Mcal, M cal,float, image cal mag, mag11 FIELD Mgal, M gal,float, galaxy mag, mag12 FIELD dM, dM,float, mag error, mag13 FIELD dt, dt,float, exposure time, 2.5*log(exptime)10 FIELD Mcal, M_CAL, float, image cal mag, mag 11 FIELD Mgal, M_GAL, float, galaxy mag, mag 12 FIELD dM, MAG_ERR, float, mag error, mag 13 FIELD dt, M_TIME, float, exposure time, 2.5*log(exptime) 14 14 15 15 # note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation 16 FIELD airmass, airmass, float, (airmass - 1), airmass16 FIELD airmass, AIRMASS, float, (airmass - 1), airmass 17 17 FIELD az, AZ, float, telescope azimuth 18 18 … … 25 25 FIELD dSky, SKY_FLUX_ERR, float, local estimate of sky flux, counts/sec 26 26 27 FIELD t, t,unsigned int, time in seconds (UNIX)28 FIELD averef, averef,unsigned int, reference to average entry27 FIELD t, TIME, unsigned int, time in seconds (UNIX) 28 FIELD averef, AVE_REF, unsigned int, reference to average entry 29 29 30 30 # Pan-STARRS uses a 64-bit detection ID. keep this in two 32 bit ints for backwards compatibility? … … 35 35 FIELD imageID_lo, IMAGE_ID_LO, unsigned int, reference to image 36 36 37 FIELD FWx, FW x,short, object fwhm major axis, 1/100 of arcsec38 FIELD FWy, FW y,short, object fwhm minor axis, 1/100 of arcsec39 FIELD theta, theta,short, angle wrt ccd X dir, (0xffff/360) deg40 FIELD photcode, photcode, unsigned short, photcode37 FIELD FWx, FWHM_MAJOR, short, object fwhm major axis, 1/100 of arcsec 38 FIELD FWy, FWHM_MINOR, short, object fwhm minor axis, 1/100 of arcsec 39 FIELD theta, PSF_THETA, short, angle wrt ccd X dir, (0xffff/360) deg 40 FIELD photcode, PHOTCODE, unsigned short, photcode 41 41 42 FIELD flags, flags, unsigned short, flags for various uses42 FIELD flags, FLAGS, unsigned short, flags for various uses 43 43 44 44 FIELD dXccd, X_CCD_ERR, short, X coord error on chip, pixels … … 48 48 FIELD qPSF, PSF_QF, short, psf coverage/quality factor 49 49 50 FIELD dophot, dophot, char, dophot type51 FIELD stargal, stargal,char, star-galaxy separator50 FIELD dophot, DOPHOT, char, dophot type 51 FIELD stargal, STAR_GAL, char, star-galaxy separator 52 52 53 53 # we need extra bytes for padding purposes... 54 FIELD dummy, dummy, char[2], padding 55 56 # float : 13 x 4 = 52 57 # int: 6 x 4 = 24 58 # short: 8 x 2 = 16 59 # char : 2 = 2 54 FIELD dummy, DUMMY, char[2], padding -
trunk/Ohana/src/libautocode/def/measure-ps1-dev-1.d
r15038 r15511 29 29 30 30 # Pan-STARRS uses a 64-bit detection ID. keep this in two 32 bit ints for backwards compatibility? 31 FIELD detID, DET_ID, unsigned int, ID upper bytes31 FIELD detID, DET_ID, unsigned int, detection ID 32 32 FIELD imageID, IMAGE_ID, unsigned int, reference to image 33 33 … … 55 55 56 56 FIELD dummy, DUMMY, char[2], padding 57 58 # float : 17 x 4 = 6859 # int: 6 x 4 = 2460 # short: 8 x 2 = 1661 # char : 2 = 2 -
trunk/Ohana/src/libautocode/def/measure.d
r15038 r15511 8 8 FIELD dD, D_DEC, float, DEC offset, arcsec 9 9 FIELD M, MAG, float, catalog mag, mag 10 FIELD Mcal, M cal,float, image cal mag, mag11 FIELD Mgal, M gal,float, galaxy mag, mag12 FIELD dM, dM,float, mag error, mag13 FIELD dt, dt,float, exposure time, 2.5*log(exptime)10 FIELD Mcal, M_CAL, float, image cal mag, mag 11 FIELD Mgal, M_GAL, float, galaxy mag, mag 12 FIELD dM, MAG_ERR, float, mag error, mag 13 FIELD dt, M_TIME, float, exposure time, 2.5*log(exptime) 14 14 15 15 # note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation 16 FIELD airmass, airmass, float, (airmass - 1), airmass16 FIELD airmass, AIRMASS, float, (airmass - 1), airmass 17 17 FIELD az, AZ, float, telescope azimuth 18 18 … … 25 25 FIELD dSky, SKY_FLUX_ERR, float, local estimate of sky flux, counts/sec 26 26 27 FIELD t, t,unsigned int, time in seconds (UNIX)28 FIELD averef, averef,unsigned int, reference to average entry27 FIELD t, TIME, unsigned int, time in seconds (UNIX) 28 FIELD averef, AVE_REF, unsigned int, reference to average entry 29 29 30 30 # Pan-STARRS uses a 64-bit detection ID. keep this in two 32 bit ints for backwards compatibility? … … 38 38 FIELD extNsigma, EXT_NSIGMA, float, psf coverage/quality factor 39 39 40 FIELD FWx, FW x,short, object fwhm major axis, 1/100 of arcsec41 FIELD FWy, FW y,short, object fwhm minor axis, 1/100 of arcsec42 FIELD theta, theta,short, angle wrt ccd X dir, (0xffff/360) deg43 FIELD photcode, photcode, unsigned short, photcode40 FIELD FWx, FWHM_MAJOR, short, object fwhm major axis, 1/100 of arcsec 41 FIELD FWy, FWHM_MINOR, short, object fwhm minor axis, 1/100 of arcsec 42 FIELD theta, PSF_THETA, short, angle wrt ccd X dir, (0xffff/360) deg 43 FIELD photcode, PHOTCODE, unsigned short, photcode 44 44 45 45 FIELD dXccd, X_CCD_ERR, short, X coord error on chip, pixels … … 49 49 FIELD photFlags, PHOT_FLAGS, unsigned short, flags supplied by photometry program 50 50 51 FIELD stargal, stargal,char, star-galaxy separator51 FIELD stargal, STAR_GAL, char, star-galaxy separator 52 52 53 53 # absorb these into photFlags? 54 FIELD dophot, dophot, char, dophot type54 FIELD dophot, DOPHOT, char, dophot type 55 55 56 56 FIELD dummy, DUMMY, char[2], padding -
trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c
r15487 r15511 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 out[i].dR = in[i].dR* 0.01;13 out[i].dD = in[i].dD* 0.01;14 out[i].M = in[i].M* 0.001;15 out[i].dM = in[i].dM* 0.001;16 out[i].dt = in[i].dt* 0.001;17 out[i].Mcal = in[i].Mcal* 0.001;18 out[i].Mgal = in[i].Mgal* 0.001;19 out[i].airmass = in[i].airmass* 0.001;12 out[i].dR = (in[i].dR == NAN_S_SHORT) ? NAN : in[i].dR * 0.01; 13 out[i].dD = (in[i].dD == NAN_S_SHORT) ? NAN : in[i].dD * 0.01; 14 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 15 out[i].dM = (in[i].dM == NAN_U_CHAR) ? NAN : in[i].dM * 0.001; 16 out[i].dt = (in[i].dt == NAN_S_SHORT) ? NAN : in[i].dt * 0.001; 17 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 18 out[i].Mgal = (in[i].Mgal == NAN_S_SHORT) ? NAN : in[i].Mgal * 0.001; 19 out[i].airmass = (in[i].airmass == NAN_S_SHORT) ? NAN : in[i].airmass* 0.001; 20 20 out[i].FWx = in[i].FWx; 21 21 out[i].FWy = in[i].fwy * in[i].FWx * 0.01; … … 60 60 61 61 for (i = 0; i < Nvalues; i++) { 62 out[i].dR = in[i].dR * 100.0; 63 out[i].dD = in[i].dD * 100.0; 64 out[i].M = in[i].M * 1000.0; 62 out[i].dR = isnan(in[i].dR ) ? NAN_S_SHORT : in[i].dR * 100.0; 63 out[i].dD = isnan(in[i].dD ) ? NAN_S_SHORT : in[i].dD * 100.0; 64 out[i].M = isnan(in[i].M ) ? NAN_S_SHORT : in[i].M * 1000.0; 65 out[i].dM = isnan(in[i].dM ) ? NAN_U_CHAR : in[i].dM * 1000.0; 66 out[i].dt = isnan(in[i].dt ) ? NAN_S_SHORT : in[i].dt * 1000.0; 67 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal * 1000.0; 68 out[i].Mgal = isnan(in[i].Mgal ) ? NAN_S_SHORT : in[i].Mgal * 1000.0; 69 out[i].airmass = isnan(in[i].airmass) ? NAN_S_SHORT : in[i].airmass * 1000.0; 70 65 71 if (out[i].M < 0) { 66 72 fprintf (stderr, "."); 67 73 } 68 out[i].dM = in[i].dM * 1000.0; 69 out[i].dt = in[i].dt * 1000.0; 70 out[i].Mcal = in[i].Mcal * 1000.0; 71 out[i].Mgal = in[i].Mgal * 1000.0; 72 out[i].airmass = in[i].airmass * 1000.0; 74 73 75 out[i].FWx = in[i].FWx; 74 76 out[i].fwy = in[i].FWy * 100.0 / in[i].FWx; … … 116 118 out[i].objID_lo = 0; 117 119 118 primary[0][i].M =in[i].M * 0.001;119 primary[0][i].dM =in[i].dM * 0.001;120 primary[0][i].Xm = in[i].Xm;120 primary[0][i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 121 primary[0][i].dM = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001; 122 primary[0][i].Xm = in[i].Xm; 121 123 primary[0][i].Ncode = 0; 122 124 primary[0][i].Nused = 0; 123 124 // XXX drop this or keep this?125 // primary[0][i].Xg = in[i].Xg;126 125 } 127 126 return (out); … … 146 145 out[i].missing = in[i].missing; 147 146 148 out[i].M = primary[i].M * 1000.0;149 out[i].dM = primary[i].dM* 1000.0;147 out[i].M = isnan(primary[i].M) ? NAN_S_SHORT : primary[i].M * 1000.0; 148 out[i].dM = isnan(primary[i].dM) ? NAN_S_SHORT : primary[i].dM * 1000.0; 150 149 out[i].Xm = primary[i].Xm; 151 // out[i].Xg = in[i].Xg;152 150 } 153 151 return (out); … … 163 161 164 162 for (i = 0; i < Nvalues; i++) { 165 out[i].M = in[i].M * 0.001;166 out[i].dM = in[i].dM * 0.001;163 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 164 out[i].dM = (in[i].dM == NAN_S_SHORT) ? NAN : in[i].dM * 0.001; 167 165 out[i].Xm = in[i].Xm; 168 166 out[i].Ncode = 0; … … 181 179 182 180 for (i = 0; i < Nvalues; i++) { 183 out[i].M = in[i].M * 1000.0;184 out[i].dM = in[i].dM* 1000.0;185 out[i].Xm = in[i].Xm;181 out[i].M = isnan(in[i].M) ? NAN_S_SHORT : in[i].M * 1000.0; 182 out[i].dM = isnan(in[i].dM) ? NAN_S_SHORT : in[i].dM * 1000.0; 183 out[i].Xm = in[i].Xm; 186 184 } 187 185 return (out); … … 198 196 for (i = 0; i < Nvalues; i++) { 199 197 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 200 memcpy (out[i].dummy, in[i].dummy, 20); 201 strcpy (out[i].name, in[i].name); 198 strcpy (out[i].name, in[i].name); // out[64], in[32] 202 199 203 200 out[i].tzero = in[i].tzero; 204 201 out[i].nstar = in[i].nstar; 205 out[i].secz = in[i].secz * 0.001;206 202 out[i].NX = in[i].NX; 207 203 out[i].NY = in[i].NY; 208 out[i].apmifit = in[i].apmifit * 0.001; 209 out[i].dapmifit = in[i].dapmifit * 0.001; 210 out[i].Mcal = in[i].Mcal * 0.001; 211 out[i].dMcal = in[i].dMcal * 0.001; 204 out[i].secz = (in[i].secz == NAN_S_SHORT) ? NAN : in[i].secz * 0.001; 205 out[i].apmifit = (in[i].apmifit == NAN_S_SHORT) ? NAN : in[i].apmifit * 0.001; 206 out[i].dapmifit = (in[i].dapmifit == NAN_S_SHORT) ? NAN : in[i].dapmifit * 0.001; 207 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 208 out[i].dMcal = (in[i].dMcal == NAN_S_SHORT) ? NAN : in[i].dMcal * 0.001; 212 209 out[i].Xm = in[i].Xm; 213 210 out[i].photcode = in[i].source; … … 221 218 out[i].code = in[i].code; 222 219 out[i].ccdnum = in[i].ccdnum; 220 223 221 out[i].order = in[i].order; 224 222 out[i].Mx = in[i].Mx; … … 239 237 /* XXX add these later */ 240 238 out[i].imageID = 0; 239 240 // not available in ELIXIR 241 out[i].sidtime = NAN; 242 out[i].latitude = NAN; 241 243 } 242 244 return (out); … … 253 255 for (i = 0; i < Nvalues; i++) { 254 256 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 255 memcpy (out[i].dummy, in[i].dummy, 20);256 strcpy (out[i].name, in[i].name);257 strncpy (out[i].name, in[i].name, 31); // out[32], in[64] 258 out[i].name[31] = 0; // force termination 257 259 258 260 out[i].tzero = in[i].tzero; 259 261 out[i].nstar = in[i].nstar; 260 out[i].secz = in[i].secz * 1000.0;261 262 out[i].NX = in[i].NX; 262 263 out[i].NY = in[i].NY; 263 out[i].apmifit = in[i].apmifit * 1000.0; 264 out[i].dapmifit = in[i].dapmifit * 1000.0; 265 out[i].Mcal = in[i].Mcal * 1000.0; 266 out[i].dMcal = in[i].dMcal * 1000.0; 264 out[i].secz = isnan(in[i].secz ) ? NAN_S_SHORT : in[i].secz * 1000.0; 265 out[i].apmifit = isnan(in[i].apmifit ) ? NAN_S_SHORT : in[i].apmifit * 1000.0; 266 out[i].dapmifit = isnan(in[i].dapmifit) ? NAN_S_SHORT : in[i].dapmifit * 1000.0; 267 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal * 1000.0; 268 out[i].dMcal = isnan(in[i].dMcal ) ? NAN_S_SHORT : in[i].dMcal * 1000.0; 267 269 out[i].Xm = in[i].Xm; 268 270 out[i].source = in[i].photcode; … … 276 278 out[i].code = in[i].code; 277 279 out[i].ccdnum = in[i].ccdnum; 280 278 281 out[i].order = in[i].order; 279 282 out[i].Mx = in[i].Mx; -
trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c
r15038 r15511 10 10 11 11 for (i = 0; i < Nvalues; i++) { 12 out[i].dR = in[i].dR* 0.01;13 out[i].dD = in[i].dD* 0.01;14 out[i].M = in[i].M* 0.001;15 out[i].dM = in[i].dM* 0.001;16 out[i].Mcal = in[i].Mcal* 0.001;12 out[i].dR = (in[i].dR == NAN_S_SHORT) ? NAN : in[i].dR * 0.01; 13 out[i].dD = (in[i].dD == NAN_S_SHORT) ? NAN : in[i].dD * 0.01; 14 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 15 out[i].dM = (in[i].dM == NAN_U_CHAR) ? NAN : in[i].dM * 0.001; 16 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 17 17 out[i].dophot = in[i].dophot; 18 18 out[i].photcode = in[i].source; … … 24 24 25 25 /* these values don't exist in the Loneos format */ 26 out[i].Mgal = in[i].M;26 out[i].Mgal = out[i].M; 27 27 out[i].dt = 0; 28 28 out[i].airmass = 0; … … 62 62 63 63 for (i = 0; i < Nvalues; i++) { 64 out[i].dR = in[i].dR *100.0;65 out[i].dD = in[i].dD *100.0;66 out[i].M = in[i].M* 1000.0;67 out[i].dM = in[i].dM* 1000.0;68 out[i].Mcal = i n[i].Mcal* 1000.0;64 out[i].dR = isnan(in[i].dR ) ? NAN_S_SHORT : in[i].dR * 100.0; 65 out[i].dD = isnan(in[i].dD ) ? NAN_S_SHORT : in[i].dD * 100.0; 66 out[i].M = isnan(in[i].M ) ? NAN_S_SHORT : in[i].M * 1000.0; 67 out[i].dM = isnan(in[i].dM ) ? NAN_U_CHAR : in[i].dM * 1000.0; 68 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal * 1000.0; 69 69 out[i].dophot = in[i].dophot; 70 70 out[i].source = in[i].photcode; … … 110 110 out[i].objID_lo = 0; 111 111 112 primary[0][i].M = in[i].M * 0.001;112 primary[0][i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 113 113 primary[0][i].Xm = in[i].Xm; 114 primary[0][i].dM = 0xffff;114 primary[0][i].dM = NAN; 115 115 primary[0][i].Ncode = 0; 116 116 primary[0][i].Nused = 0; 117 118 // XXX drop this or keep this?119 // primary[0][i].Xg = in[i].Xg;120 117 } 121 118 return (out); … … 140 137 out[i].missing = in[i].missing; 141 138 142 out[i].M = primary[i].M * 1000.0;139 out[i].M = isnan(primary[i].M) ? NAN_S_SHORT : primary[i].M * 1000.0; 143 140 out[i].Xm = primary[i].Xm; 144 141 } … … 155 152 156 153 for (i = 0; i < Nvalues; i++) { 157 out[i].M = in[i].M*0.001;154 out[i].M = (in[i].M == NAN_S_SHORT) ? NAN : in[i].M * 0.001; 158 155 out[i].Xm = in[i].Xm; 159 out[i].dM = 0xffff;156 out[i].dM = NAN; 160 157 out[i].Ncode = 0; 161 158 out[i].Nused = 0; … … 173 170 174 171 for (i = 0; i < Nvalues; i++) { 175 out[i].M = i n[i].M*1000.0;172 out[i].M = isnan(in[i].M) ? NAN_S_SHORT : in[i].M * 1000.0; 176 173 out[i].Xm = in[i].Xm; 177 174 } … … 189 186 for (i = 0; i < Nvalues; i++) { 190 187 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 191 memcpy (out[i].dummy, in[i].dummy, 20); 192 strcpy (out[i].name, in[i].name); 188 strcpy (out[i].name, in[i].name); // out[64], in[32] 193 189 194 190 out[i].tzero = in[i].tzero; 195 191 out[i].nstar = in[i].nstar; 196 out[i].secz = in[i].secz * 0.001;197 192 out[i].NX = in[i].NX; 198 193 out[i].NY = in[i].NY; 199 out[i].apmifit = in[i].apmifit * 0.001; 200 out[i].dapmifit = in[i].dapmifit * 0.001; 201 out[i].Mcal = in[i].Mcal * 0.001; 202 out[i].dMcal = in[i].dMcal * 0.001; 194 195 out[i].secz = (in[i].secz == NAN_S_SHORT) ? NAN : in[i].secz * 0.001; 196 out[i].apmifit = (in[i].apmifit == NAN_S_SHORT) ? NAN : in[i].apmifit * 0.001; 197 out[i].dapmifit = (in[i].dapmifit == NAN_S_SHORT) ? NAN : in[i].dapmifit * 0.001; 198 out[i].Mcal = (in[i].Mcal == NAN_S_SHORT) ? NAN : in[i].Mcal * 0.001; 199 out[i].dMcal = (in[i].dMcal == NAN_S_SHORT) ? NAN : in[i].dMcal * 0.001; 200 203 201 out[i].Xm = in[i].Xm; 204 202 out[i].photcode = in[i].source; … … 244 242 for (i = 0; i < Nvalues; i++) { 245 243 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 246 memcpy (out[i].dummy, in[i].dummy, 20);247 strcpy (out[i].name, in[i].name);244 strncpy (out[i].name, in[i].name, 31); // out[32], in[64] 245 out[i].name[31] = 0; // force termination 248 246 249 247 out[i].tzero = in[i].tzero; 250 248 out[i].nstar = in[i].nstar; 251 out[i].secz = in[i].secz * 1000.0;252 249 out[i].NX = in[i].NX; 253 250 out[i].NY = in[i].NY; 254 out[i].apmifit = in[i].apmifit * 1000.0; 255 out[i].dapmifit = in[i].dapmifit * 1000.0; 256 out[i].Mcal = in[i].Mcal * 1000.0; 257 out[i].dMcal = in[i].dMcal * 1000.0; 251 252 out[i].secz = isnan(in[i].secz ) ? NAN_S_SHORT : in[i].secz * 1000.0; 253 out[i].apmifit = isnan(in[i].apmifit ) ? NAN_S_SHORT : in[i].apmifit * 1000.0; 254 out[i].dapmifit = isnan(in[i].dapmifit) ? NAN_S_SHORT : in[i].dapmifit * 1000.0; 255 out[i].Mcal = isnan(in[i].Mcal ) ? NAN_S_SHORT : in[i].Mcal * 1000.0; 256 out[i].dMcal = isnan(in[i].dMcal ) ? NAN_S_SHORT : in[i].dMcal * 1000.0; 257 258 258 out[i].Xm = in[i].Xm; 259 259 out[i].source = in[i].photcode; -
trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
r15038 r15511 34 34 out[i].Sky = in[i].Sky; 35 35 out[i].dSky = in[i].dSky; 36 out[i].qPSF = in[i].qPSF;36 out[i].qPSF = (in[i].qPSF == NAN_S_SHORT) ? NAN : in[i].qPSF; 37 37 out[i].detID = in[i].detID_lo; 38 38 out[i].imageID = in[i].imageID_lo; … … 80 80 out[i].Sky = in[i].Sky; 81 81 out[i].dSky = in[i].dSky; 82 out[i].qPSF = i n[i].qPSF;82 out[i].qPSF = isnan(in[i].qPSF) ? NAN_S_SHORT : in[i].qPSF; 83 83 out[i].detID_hi = 0; 84 84 out[i].detID_lo = in[i].detID; … … 199 199 for (i = 0; i < Nvalues; i++) { 200 200 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 201 strcpy (out[i].name, in[i].name); 201 strcpy (out[i].name, in[i].name); // out[64], in[32] 202 202 203 203 out[i].tzero = in[i].tzero; … … 254 254 for (i = 0; i < Nvalues; i++) { 255 255 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 256 strcpy (out[i].name, in[i].name); 256 strncpy (out[i].name, in[i].name, 31); // out[32], in[64] 257 out[i].name[31] = 0; // force termination 257 258 258 259 out[i].tzero = in[i].tzero; -
trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
r15038 r15511 34 34 out[i].Sky = in[i].Sky; 35 35 out[i].dSky = in[i].dSky; 36 out[i].qPSF = in[i].qPSF;36 out[i].qPSF = (in[i].qPSF == NAN_S_SHORT) ? NAN : in[i].qPSF; 37 37 out[i].detID = in[i].detID_lo; 38 38 out[i].imageID = in[i].imageID_lo; … … 80 80 out[i].Sky = in[i].Sky; 81 81 out[i].dSky = in[i].dSky; 82 out[i].qPSF = i n[i].qPSF;82 out[i].qPSF = isnan(in[i].qPSF) ? NAN_S_SHORT : in[i].qPSF; 83 83 out[i].detID_hi = 0; 84 84 out[i].detID_lo = in[i].detID;
Note:
See TracChangeset
for help on using the changeset viewer.
