Changeset 30502
- Timestamp:
- Feb 7, 2011, 4:33:07 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101205/Ohana/src/libdvo
- Files:
-
- 13 edited
-
Makefile (modified) (2 diffs)
-
doc/dvo-images.txt (modified) (1 diff)
-
src/dvo_convert_PS1_DEV_1.c (modified) (12 diffs)
-
src/dvo_convert_PS1_DEV_2.c (modified) (12 diffs)
-
src/dvo_convert_PS1_DEV_3.c (modified) (6 diffs)
-
src/dvo_convert_PS1_REF.c (modified) (12 diffs)
-
src/dvo_convert_PS1_V1.c (modified) (12 diffs)
-
src/dvo_convert_PS1_V2.c (modified) (15 diffs)
-
src/dvo_convert_elixir.c (modified) (12 diffs)
-
src/dvo_convert_loneos.c (modified) (10 diffs)
-
src/dvo_convert_panstarrs_DEV_0.c (modified) (10 diffs)
-
src/dvo_convert_panstarrs_DEV_1.c (modified) (10 diffs)
-
src/photfits.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/Makefile
r27580 r30502 51 51 $(SRC)/mosaic_astrom.$(ARCH).o \ 52 52 $(SRC)/fits_db.$(ARCH).o \ 53 $(SRC)/photfits.$(ARCH).o \54 53 $(SRC)/dvo_image.$(ARCH).o \ 55 54 $(SRC)/dvo_image_raw.$(ARCH).o \ … … 77 76 $(SRC)/dvo_util.$(ARCH).o 78 77 79 # $(SRC)/dvo_convert_panstarrs.$(ARCH).o \ 80 # $(SRC)/dvo_convert_pmtest.$(ARCH).o \ 78 # $(SRC)/dvo_convert_panstarrs.$(ARCH).o 79 # $(SRC)/dvo_convert_pmtest.$(ARCH).o 80 # $(SRC)/photfits.$(ARCH).o 81 81 82 82 include ../libautocode/Makefile.Targets -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/doc/dvo-images.txt
r15240 r30502 1 1 2 the dvo image table is not extremely efficient. it is unsorted, and 3 spatial searches consist of complete scans of the table. 2 20110203 4 3 5 a spatial index could consist of five cardinal points for each square 6 image (4 corners and the center) or a central point and max radius. 7 table would consist each would be 4 The Image table (PS1_V2) has a bunch of fields that are not really 5 used by anything / much. I would like to re-use those bytes to 6 store information about the quality of the astrometric and 7 photometric calibrations. 8 9 The under-used fields are the 'photometric zero point variation' 10 polynomial terms (Mx, My, ... Mxxxx, Myyyy). 11 12 (I list the sourceID, which does not change, because the word-boundaries matter) 13 FIELD sourceID, SOURCE_ID, unsigned short, analysis source ID 14 FIELD order, ORDER, short, Mrel 2D polynomical order 15 FIELD Mx, MX, short, Mrel polyterm 16 FIELD My, MY, short, Mrel polyterm 17 18 FIELD Mxx, MXX, short, Mrel polyterm 19 FIELD Mxy, MXY, short, Mrel polyterm 20 FIELD Myy, MYY, short, Mrel polyterm 21 FIELD Mxxx, MXXX, short, Mrel polyterm 22 23 FIELD Mxxy, MXXY, short, Mrel polyterm 24 FIELD Mxyy, MXYY, short, Mrel polyterm 25 FIELD Myyy, MYYY, short, Mrel polyterm 26 FIELD Mxxxx, MXXXX, short, Mrel polyterm 27 28 FIELD Mxxxy, MXXXY, short, Mrel polyterm 29 FIELD Mxxyy, MXXYY, short, Mrel polyterm 30 FIELD Mxyyy, MXYYY, short, Mrel polyterm 31 FIELD Myyyy, MYYYY, short, Mrel polyterm 32 (30 bytes) 33 34 I am going to replace these with: 35 36 photom_map_id (int) : index to a 2D map of the zp variations (table and format not yet defined) 37 astrom_map_id (int) : index to a 2D map of the zp variations (table and format not yet defined) 38 dMagSys (float) : systematic photometric error (mag) 39 dXpixSys (float) : systematic astrometric error (pix) 40 dYpixSys (float) : systematic astrometric error (pix) 41 nFitAstrom (short) : number of stars used for astrometric calibration (saturate at 0x7fff) 42 nFitPhotom (short) : number of stars used for astrometric calibration (saturate at 0x7fff) 43 (24 bytes) 44 45 As for the existing uses of these fields: 46 47 The official use can just be dropped (replaced by the maps and 48 recalculated if needed -- no db actually uses them). There are a 49 few places in the code where these fields were overloaded: 50 51 Triangular Images : in the skycell creation code, there is an option 52 to create images which are the triangular projection centers for a 53 given subdivided geometric solid. This code was overloading the Mx, 54 My, and Mxxx through Myyy fields. I can invalidate any existing db 55 with triangles (probably none are needed) and repurpose some of the 56 fields above for these values. (addstar/src/sky_tesslation.c, opihi/dvo/images.c) 57 58 Mxxxx : some code was using Mxxxx to store nFitPhotom. Again, any 59 existing databases are unlikely to use that info (CFHT skyprobe 60 only). If I am clever, I can align the existing bytes so that the 61 old Mxxxx hits the new nFitPhotom. (addstar/src/calibrate.c, 62 dbExtractImages.c) 63 64 Myyyy : dbExtractImages.c expects this value to have (sky - 0x8000), 65 but that value is not actually set by any code. Ignore (replace?) 66 67 FIELD sourceID, SOURCE_ID, unsigned short, analysis source ID 68 FIELD dummy1, DUMMY1, short, place holder for byte boundaries 69 FIELD dummy2, DUMMY2, short, place holder for byte boundaries 70 FIELD dummy3, DUMMY3, short, place holder for byte boundaries 71 72 FIELD dXpixSys, XPIX_SYS_ERR, float, systematic astrometry error in X 73 FIELD dYpixSys, YPIX_SYS_ERR, float, systematic astrometry error in Y 74 75 FIELD dMagSys, MAG_SYS_ERR, float, systematic photometry error 76 FIELD nFitAstrom, N_FIT_ASTROM, short, number of stars used for astrometry cal 77 FIELD nFitPhotom, N_FIT_PHOTOM, short, number of stars used for photometry cal 78 79 FIELD photom_map_id, PHOTOM_MAP_ID, unsigned int, reference to 2D zero point map 80 FIELD astrom_map_id, ASTROM_MAP_ID, unsigned int, reference to 2D astrometry map 81 82 older: 83 84 the dvo image table is not extremely efficient. it is unsorted, and 85 spatial searches consist of complete scans of the table. 86 87 a spatial index could consist of five cardinal points for each 88 square image (4 corners and the center) or a central point and max 89 radius. 90 -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c
r27580 r30502 8 8 Measure *out; 9 9 10 ALLOCATE (out, Measure, Nvalues);10 ALLOCATE_ZERO (out, Measure, Nvalues); 11 11 12 12 for (i = 0; i < Nvalues; i++) { … … 66 66 Measure_PS1_DEV_1 *out; 67 67 68 ALLOCATE (out, Measure_PS1_DEV_1, Nvalues);68 ALLOCATE_ZERO (out, Measure_PS1_DEV_1, Nvalues); 69 69 70 70 for (i = 0; i < Nvalues; i++) { … … 113 113 Average *out; 114 114 115 ALLOCATE (out, Average, Nvalues);115 ALLOCATE_ZERO (out, Average, Nvalues); 116 116 117 117 for (i = 0; i < Nvalues; i++) { … … 157 157 Average_PS1_DEV_1 *out; 158 158 159 ALLOCATE (out, Average_PS1_DEV_1, Nvalues);159 ALLOCATE_ZERO (out, Average_PS1_DEV_1, Nvalues); 160 160 161 161 for (i = 0; i < Nvalues; i++) { … … 191 191 SecFilt *out; 192 192 193 ALLOCATE (out, SecFilt, Nvalues);193 ALLOCATE_ZERO (out, SecFilt, Nvalues); 194 194 195 195 for (i = 0; i < Nvalues; i++) { … … 215 215 SecFilt_PS1_DEV_1 *out; 216 216 217 ALLOCATE (out, SecFilt_PS1_DEV_1, Nvalues);217 ALLOCATE_ZERO (out, SecFilt_PS1_DEV_1, Nvalues); 218 218 219 219 for (i = 0; i < Nvalues; i++) { … … 232 232 Image *out; 233 233 234 ALLOCATE (out, Image, Nvalues);234 ALLOCATE_ZERO (out, Image, Nvalues); 235 235 236 236 for (i = 0; i < Nvalues; i++) { … … 263 263 out[i].imageID = in[i].imageID; 264 264 265 out[i].order = in[i].order; 266 out[i].Mx = in[i].Mx; 267 out[i].My = in[i].My; 268 out[i].Mxx = in[i].Mxx; 269 out[i].Mxy = in[i].Mxy; 270 out[i].Myy = in[i].Myy; 271 out[i].Mxxx = in[i].Mxxx; 272 out[i].Mxxy = in[i].Mxxy; 273 out[i].Mxyy = in[i].Mxyy; 274 out[i].Myyy = in[i].Myyy; 275 out[i].Mxxxx = in[i].Mxxxx; 276 out[i].Mxxxy = in[i].Mxxxy; 277 out[i].Mxxyy = in[i].Mxxyy; 278 out[i].Mxyyy = in[i].Mxyyy; 279 out[i].Myyyy = in[i].Myyyy; 265 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 266 // with the following. (no real databases used those values -- see 267 // libdvo/doc/dvo-images.txt) 268 out[i].dummy1 = in[i].dummy1; 269 out[i].dummy2 = in[i].dummy2; 270 out[i].dummy3 = in[i].dummy3; 271 out[i].dXpixSys = in[i].dXpixSys; 272 out[i].dYpixSys = in[i].dYpixSys; 273 out[i].dMagSys = in[i].dMagSys; 274 out[i].nFitAstrom = in[i].nFitAstrom; 275 out[i].nFitPhotom = in[i].nFitPhotom; 276 out[i].photom_map_id = in[i].photom_map_id; 277 out[i].astrom_map_id = in[i].astrom_map_id; 280 278 281 279 // changed or added for PS1_DEV_2 … … 301 299 Image_PS1_DEV_1 *out; 302 300 303 ALLOCATE (out, Image_PS1_DEV_1, Nvalues);301 ALLOCATE_ZERO (out, Image_PS1_DEV_1, Nvalues); 304 302 305 303 for (i = 0; i < Nvalues; i++) { … … 332 330 out[i].imageID = in[i].imageID; 333 331 334 out[i].order = in[i].order; 335 out[i].Mx = in[i].Mx; 336 out[i].My = in[i].My; 337 out[i].Mxx = in[i].Mxx; 338 out[i].Mxy = in[i].Mxy; 339 out[i].Myy = in[i].Myy; 340 out[i].Mxxx = in[i].Mxxx; 341 out[i].Mxxy = in[i].Mxxy; 342 out[i].Mxyy = in[i].Mxyy; 343 out[i].Myyy = in[i].Myyy; 344 out[i].Mxxxx = in[i].Mxxxx; 345 out[i].Mxxxy = in[i].Mxxxy; 346 out[i].Mxxyy = in[i].Mxxyy; 347 out[i].Mxyyy = in[i].Mxyyy; 348 out[i].Myyyy = in[i].Myyyy; 332 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 333 // with the following. (no real databases used those values -- see 334 // libdvo/doc/dvo-images.txt) 335 out[i].dummy1 = in[i].dummy1; 336 out[i].dummy2 = in[i].dummy2; 337 out[i].dummy3 = in[i].dummy3; 338 out[i].dXpixSys = in[i].dXpixSys; 339 out[i].dYpixSys = in[i].dYpixSys; 340 out[i].dMagSys = in[i].dMagSys; 341 out[i].nFitAstrom = in[i].nFitAstrom; 342 out[i].nFitPhotom = in[i].nFitPhotom; 343 out[i].photom_map_id = in[i].photom_map_id; 344 out[i].astrom_map_id = in[i].astrom_map_id; 349 345 350 346 // changed or added for PS1_V1 … … 359 355 PhotCode *out; 360 356 361 ALLOCATE (out, PhotCode, Nvalues);357 ALLOCATE_ZERO (out, PhotCode, Nvalues); 362 358 363 359 for (i = 0; i < Nvalues; i++) { … … 398 394 PhotCode_PS1_DEV_1 *out; 399 395 400 ALLOCATE (out, PhotCode_PS1_DEV_1, Nvalues);396 ALLOCATE_ZERO (out, PhotCode_PS1_DEV_1, Nvalues); 401 397 402 398 for (i = 0; i < Nvalues; i++) { -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c
r27580 r30502 8 8 Measure *out; 9 9 10 ALLOCATE (out, Measure, Nvalues);10 ALLOCATE_ZERO (out, Measure, Nvalues); 11 11 12 12 for (i = 0; i < Nvalues; i++) { … … 63 63 Measure_PS1_DEV_2 *out; 64 64 65 ALLOCATE (out, Measure_PS1_DEV_2, Nvalues);65 ALLOCATE_ZERO (out, Measure_PS1_DEV_2, Nvalues); 66 66 67 67 for (i = 0; i < Nvalues; i++) { … … 109 109 Average *out; 110 110 111 ALLOCATE (out, Average, Nvalues);111 ALLOCATE_ZERO (out, Average, Nvalues); 112 112 113 113 for (i = 0; i < Nvalues; i++) { … … 151 151 Average_PS1_DEV_2 *out; 152 152 153 ALLOCATE (out, Average_PS1_DEV_2, Nvalues);153 ALLOCATE_ZERO (out, Average_PS1_DEV_2, Nvalues); 154 154 155 155 for (i = 0; i < Nvalues; i++) { … … 185 185 SecFilt *out; 186 186 187 ALLOCATE (out, SecFilt, Nvalues);187 ALLOCATE_ZERO (out, SecFilt, Nvalues); 188 188 189 189 for (i = 0; i < Nvalues; i++) { … … 209 209 SecFilt_PS1_DEV_2 *out; 210 210 211 ALLOCATE (out, SecFilt_PS1_DEV_2, Nvalues);211 ALLOCATE_ZERO (out, SecFilt_PS1_DEV_2, Nvalues); 212 212 213 213 for (i = 0; i < Nvalues; i++) { … … 226 226 Image *out; 227 227 228 ALLOCATE (out, Image, Nvalues);228 ALLOCATE_ZERO (out, Image, Nvalues); 229 229 230 230 for (i = 0; i < Nvalues; i++) { … … 259 259 out[i].sourceID = in[i].sourceID; 260 260 261 out[i].order = in[i].order; 262 out[i].Mx = in[i].Mx; 263 out[i].My = in[i].My; 264 out[i].Mxx = in[i].Mxx; 265 out[i].Mxy = in[i].Mxy; 266 out[i].Myy = in[i].Myy; 267 out[i].Mxxx = in[i].Mxxx; 268 out[i].Mxxy = in[i].Mxxy; 269 out[i].Mxyy = in[i].Mxyy; 270 out[i].Myyy = in[i].Myyy; 271 out[i].Mxxxx = in[i].Mxxxx; 272 out[i].Mxxxy = in[i].Mxxxy; 273 out[i].Mxxyy = in[i].Mxxyy; 274 out[i].Mxyyy = in[i].Mxyyy; 275 out[i].Myyyy = in[i].Myyyy; 261 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 262 // with the following. (no real databases used those values -- see 263 // libdvo/doc/dvo-images.txt) 264 out[i].dummy1 = in[i].dummy1; 265 out[i].dummy2 = in[i].dummy2; 266 out[i].dummy3 = in[i].dummy3; 267 out[i].dXpixSys = in[i].dXpixSys; 268 out[i].dYpixSys = in[i].dYpixSys; 269 out[i].dMagSys = in[i].dMagSys; 270 out[i].nFitAstrom = in[i].nFitAstrom; 271 out[i].nFitPhotom = in[i].nFitPhotom; 272 out[i].photom_map_id = in[i].photom_map_id; 273 out[i].astrom_map_id = in[i].astrom_map_id; 276 274 277 275 // changed or added for PS1_V1 … … 292 290 Image_PS1_DEV_2 *out; 293 291 294 ALLOCATE (out, Image_PS1_DEV_2, Nvalues);292 ALLOCATE_ZERO (out, Image_PS1_DEV_2, Nvalues); 295 293 296 294 for (i = 0; i < Nvalues; i++) { … … 326 324 out[i].sourceID = in[i].sourceID; 327 325 328 out[i].order = in[i].order; 329 out[i].Mx = in[i].Mx; 330 out[i].My = in[i].My; 331 out[i].Mxx = in[i].Mxx; 332 out[i].Mxy = in[i].Mxy; 333 out[i].Myy = in[i].Myy; 334 out[i].Mxxx = in[i].Mxxx; 335 out[i].Mxxy = in[i].Mxxy; 336 out[i].Mxyy = in[i].Mxyy; 337 out[i].Myyy = in[i].Myyy; 338 out[i].Mxxxx = in[i].Mxxxx; 339 out[i].Mxxxy = in[i].Mxxxy; 340 out[i].Mxxyy = in[i].Mxxyy; 341 out[i].Mxyyy = in[i].Mxyyy; 342 out[i].Myyyy = in[i].Myyyy; 326 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 327 // with the following. (no real databases used those values -- see 328 // libdvo/doc/dvo-images.txt) 329 out[i].dummy1 = in[i].dummy1; 330 out[i].dummy2 = in[i].dummy2; 331 out[i].dummy3 = in[i].dummy3; 332 out[i].dXpixSys = in[i].dXpixSys; 333 out[i].dYpixSys = in[i].dYpixSys; 334 out[i].dMagSys = in[i].dMagSys; 335 out[i].nFitAstrom = in[i].nFitAstrom; 336 out[i].nFitPhotom = in[i].nFitPhotom; 337 out[i].photom_map_id = in[i].photom_map_id; 338 out[i].astrom_map_id = in[i].astrom_map_id; 343 339 344 340 // changed or added for PS1_V1 … … 353 349 PhotCode *out; 354 350 355 ALLOCATE (out, PhotCode, Nvalues);351 ALLOCATE_ZERO (out, PhotCode, Nvalues); 356 352 357 353 for (i = 0; i < Nvalues; i++) { … … 390 386 PhotCode_PS1_DEV_2 *out; 391 387 392 ALLOCATE (out, PhotCode_PS1_DEV_2, Nvalues);388 ALLOCATE_ZERO (out, PhotCode_PS1_DEV_2, Nvalues); 393 389 394 390 for (i = 0; i < Nvalues; i++) { -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_3.c
r27491 r30502 10 10 Image *out; 11 11 12 ALLOCATE (out, Image, Nvalues);12 ALLOCATE_ZERO (out, Image, Nvalues); 13 13 14 14 for (i = 0; i < Nvalues; i++) { … … 43 43 out[i].sourceID = in[i].sourceID; 44 44 45 out[i].order = in[i].order; 46 out[i].Mx = in[i].Mx; 47 out[i].My = in[i].My; 48 out[i].Mxx = in[i].Mxx; 49 out[i].Mxy = in[i].Mxy; 50 out[i].Myy = in[i].Myy; 51 out[i].Mxxx = in[i].Mxxx; 52 out[i].Mxxy = in[i].Mxxy; 53 out[i].Mxyy = in[i].Mxyy; 54 out[i].Myyy = in[i].Myyy; 55 out[i].Mxxxx = in[i].Mxxxx; 56 out[i].Mxxxy = in[i].Mxxxy; 57 out[i].Mxxyy = in[i].Mxxyy; 58 out[i].Mxyyy = in[i].Mxyyy; 59 out[i].Myyyy = in[i].Myyyy; 45 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 46 // with the following. (no real databases used those values -- see 47 // libdvo/doc/dvo-images.txt) 48 out[i].dummy1 = in[i].dummy1; 49 out[i].dummy2 = in[i].dummy2; 50 out[i].dummy3 = in[i].dummy3; 51 out[i].dXpixSys = in[i].dXpixSys; 52 out[i].dYpixSys = in[i].dYpixSys; 53 out[i].dMagSys = in[i].dMagSys; 54 out[i].nFitAstrom = in[i].nFitAstrom; 55 out[i].nFitPhotom = in[i].nFitPhotom; 56 out[i].photom_map_id = in[i].photom_map_id; 57 out[i].astrom_map_id = in[i].astrom_map_id; 60 58 61 59 // changed or added for PS1_V1 … … 71 69 Image_PS1_DEV_3 *out; 72 70 73 ALLOCATE (out, Image_PS1_DEV_3, Nvalues);71 ALLOCATE_ZERO (out, Image_PS1_DEV_3, Nvalues); 74 72 75 73 for (i = 0; i < Nvalues; i++) { … … 104 102 out[i].sourceID = in[i].sourceID; 105 103 106 out[i].order = in[i].order; 107 out[i].Mx = in[i].Mx; 108 out[i].My = in[i].My; 109 out[i].Mxx = in[i].Mxx; 110 out[i].Mxy = in[i].Mxy; 111 out[i].Myy = in[i].Myy; 112 out[i].Mxxx = in[i].Mxxx; 113 out[i].Mxxy = in[i].Mxxy; 114 out[i].Mxyy = in[i].Mxyy; 115 out[i].Myyy = in[i].Myyy; 116 out[i].Mxxxx = in[i].Mxxxx; 117 out[i].Mxxxy = in[i].Mxxxy; 118 out[i].Mxxyy = in[i].Mxxyy; 119 out[i].Mxyyy = in[i].Mxyyy; 120 out[i].Myyyy = in[i].Myyyy; 104 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 105 // with the following. (no real databases used those values -- see 106 // libdvo/doc/dvo-images.txt) 107 out[i].dummy1 = in[i].dummy1; 108 out[i].dummy2 = in[i].dummy2; 109 out[i].dummy3 = in[i].dummy3; 110 out[i].dXpixSys = in[i].dXpixSys; 111 out[i].dYpixSys = in[i].dYpixSys; 112 out[i].dMagSys = in[i].dMagSys; 113 out[i].nFitAstrom = in[i].nFitAstrom; 114 out[i].nFitPhotom = in[i].nFitPhotom; 115 out[i].photom_map_id = in[i].photom_map_id; 116 out[i].astrom_map_id = in[i].astrom_map_id; 121 117 122 118 // changed or added for PS1_V1 … … 131 127 PhotCode *out; 132 128 133 ALLOCATE (out, PhotCode, Nvalues);129 ALLOCATE_ZERO (out, PhotCode, Nvalues); 134 130 135 131 for (i = 0; i < Nvalues; i++) { … … 167 163 PhotCode_PS1_DEV_3 *out; 168 164 169 ALLOCATE (out, PhotCode_PS1_DEV_3, Nvalues);165 ALLOCATE_ZERO (out, PhotCode_PS1_DEV_3, Nvalues); 170 166 171 167 for (i = 0; i < Nvalues; i++) { -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c
r27580 r30502 8 8 Measure *out; 9 9 10 ALLOCATE (out, Measure, Nvalues);10 ALLOCATE_ZERO (out, Measure, Nvalues); 11 11 12 12 for (i = 0; i < Nvalues; i++) { … … 61 61 Measure_PS1_REF *out; 62 62 63 ALLOCATE (out, Measure_PS1_REF, Nvalues);63 ALLOCATE_ZERO (out, Measure_PS1_REF, Nvalues); 64 64 65 65 for (i = 0; i < Nvalues; i++) { … … 84 84 Average *out; 85 85 86 ALLOCATE (out, Average, Nvalues);86 ALLOCATE_ZERO (out, Average, Nvalues); 87 87 88 88 for (i = 0; i < Nvalues; i++) { … … 124 124 Average_PS1_REF *out; 125 125 126 ALLOCATE (out, Average_PS1_REF, Nvalues);126 ALLOCATE_ZERO (out, Average_PS1_REF, Nvalues); 127 127 128 128 for (i = 0; i < Nvalues; i++) { … … 147 147 SecFilt *out; 148 148 149 ALLOCATE (out, SecFilt, Nvalues);149 ALLOCATE_ZERO (out, SecFilt, Nvalues); 150 150 151 151 for (i = 0; i < Nvalues; i++) { … … 169 169 SecFilt_PS1_REF *out; 170 170 171 ALLOCATE (out, SecFilt_PS1_REF, Nvalues);171 ALLOCATE_ZERO (out, SecFilt_PS1_REF, Nvalues); 172 172 173 173 for (i = 0; i < Nvalues; i++) { … … 183 183 Image *out; 184 184 185 ALLOCATE (out, Image, Nvalues);185 ALLOCATE_ZERO (out, Image, Nvalues); 186 186 187 187 for (i = 0; i < Nvalues; i++) { … … 218 218 out[i].sourceID = in[i].sourceID; 219 219 220 out[i].order = in[i].order; 221 out[i].Mx = in[i].Mx; 222 out[i].My = in[i].My; 223 out[i].Mxx = in[i].Mxx; 224 out[i].Mxy = in[i].Mxy; 225 out[i].Myy = in[i].Myy; 226 out[i].Mxxx = in[i].Mxxx; 227 out[i].Mxxy = in[i].Mxxy; 228 out[i].Mxyy = in[i].Mxyy; 229 out[i].Myyy = in[i].Myyy; 230 out[i].Mxxxx = in[i].Mxxxx; 231 out[i].Mxxxy = in[i].Mxxxy; 232 out[i].Mxxyy = in[i].Mxxyy; 233 out[i].Mxyyy = in[i].Mxyyy; 234 out[i].Myyyy = in[i].Myyyy; 220 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 221 // with the following. (no real databases used those values -- see 222 // libdvo/doc/dvo-images.txt) 223 out[i].dummy1 = in[i].dummy1; 224 out[i].dummy2 = in[i].dummy2; 225 out[i].dummy3 = in[i].dummy3; 226 out[i].dXpixSys = in[i].dXpixSys; 227 out[i].dYpixSys = in[i].dYpixSys; 228 out[i].dMagSys = in[i].dMagSys; 229 out[i].nFitAstrom = in[i].nFitAstrom; 230 out[i].nFitPhotom = in[i].nFitPhotom; 231 out[i].photom_map_id = in[i].photom_map_id; 232 out[i].astrom_map_id = in[i].astrom_map_id; 235 233 236 234 // changed or added for PS1_V2 … … 247 245 Image_PS1_REF *out; 248 246 249 ALLOCATE (out, Image_PS1_REF, Nvalues);247 ALLOCATE_ZERO (out, Image_PS1_REF, Nvalues); 250 248 251 249 for (i = 0; i < Nvalues; i++) { … … 282 280 out[i].sourceID = in[i].sourceID; 283 281 284 out[i].order = in[i].order; 285 out[i].Mx = in[i].Mx; 286 out[i].My = in[i].My; 287 out[i].Mxx = in[i].Mxx; 288 out[i].Mxy = in[i].Mxy; 289 out[i].Myy = in[i].Myy; 290 out[i].Mxxx = in[i].Mxxx; 291 out[i].Mxxy = in[i].Mxxy; 292 out[i].Mxyy = in[i].Mxyy; 293 out[i].Myyy = in[i].Myyy; 294 out[i].Mxxxx = in[i].Mxxxx; 295 out[i].Mxxxy = in[i].Mxxxy; 296 out[i].Mxxyy = in[i].Mxxyy; 297 out[i].Mxyyy = in[i].Mxyyy; 298 out[i].Myyyy = in[i].Myyyy; 282 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 283 // with the following. (no real databases used those values -- see 284 // libdvo/doc/dvo-images.txt) 285 out[i].dummy1 = in[i].dummy1; 286 out[i].dummy2 = in[i].dummy2; 287 out[i].dummy3 = in[i].dummy3; 288 out[i].dXpixSys = in[i].dXpixSys; 289 out[i].dYpixSys = in[i].dYpixSys; 290 out[i].dMagSys = in[i].dMagSys; 291 out[i].nFitAstrom = in[i].nFitAstrom; 292 out[i].nFitPhotom = in[i].nFitPhotom; 293 out[i].photom_map_id = in[i].photom_map_id; 294 out[i].astrom_map_id = in[i].astrom_map_id; 299 295 } 300 296 return (out); … … 306 302 PhotCode *out; 307 303 308 ALLOCATE (out, PhotCode, Nvalues);304 ALLOCATE_ZERO (out, PhotCode, Nvalues); 309 305 310 306 for (i = 0; i < Nvalues; i++) { … … 342 338 PhotCode_PS1_REF *out; 343 339 344 ALLOCATE (out, PhotCode_PS1_REF, Nvalues);340 ALLOCATE_ZERO (out, PhotCode_PS1_REF, Nvalues); 345 341 346 342 for (i = 0; i < Nvalues; i++) { -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c
r27580 r30502 8 8 Measure *out; 9 9 10 ALLOCATE (out, Measure, Nvalues);10 ALLOCATE_ZERO (out, Measure, Nvalues); 11 11 12 12 for (i = 0; i < Nvalues; i++) { … … 61 61 Measure_PS1_V1 *out; 62 62 63 ALLOCATE (out, Measure_PS1_V1, Nvalues);63 ALLOCATE_ZERO (out, Measure_PS1_V1, Nvalues); 64 64 65 65 for (i = 0; i < Nvalues; i++) { … … 116 116 Average *out; 117 117 118 ALLOCATE (out, Average, Nvalues);118 ALLOCATE_ZERO (out, Average, Nvalues); 119 119 120 120 for (i = 0; i < Nvalues; i++) { … … 156 156 Average_PS1_V1 *out; 157 157 158 ALLOCATE (out, Average_PS1_V1, Nvalues);158 ALLOCATE_ZERO (out, Average_PS1_V1, Nvalues); 159 159 160 160 for (i = 0; i < Nvalues; i++) { … … 191 191 SecFilt *out; 192 192 193 ALLOCATE (out, SecFilt, Nvalues);193 ALLOCATE_ZERO (out, SecFilt, Nvalues); 194 194 195 195 for (i = 0; i < Nvalues; i++) { … … 213 213 SecFilt_PS1_V1 *out; 214 214 215 ALLOCATE (out, SecFilt_PS1_V1, Nvalues);215 ALLOCATE_ZERO (out, SecFilt_PS1_V1, Nvalues); 216 216 217 217 for (i = 0; i < Nvalues; i++) { … … 232 232 Image *out; 233 233 234 ALLOCATE (out, Image, Nvalues);234 ALLOCATE_ZERO (out, Image, Nvalues); 235 235 236 236 for (i = 0; i < Nvalues; i++) { … … 267 267 out[i].sourceID = in[i].sourceID; 268 268 269 out[i].order = in[i].order; 270 out[i].Mx = in[i].Mx; 271 out[i].My = in[i].My; 272 out[i].Mxx = in[i].Mxx; 273 out[i].Mxy = in[i].Mxy; 274 out[i].Myy = in[i].Myy; 275 out[i].Mxxx = in[i].Mxxx; 276 out[i].Mxxy = in[i].Mxxy; 277 out[i].Mxyy = in[i].Mxyy; 278 out[i].Myyy = in[i].Myyy; 279 out[i].Mxxxx = in[i].Mxxxx; 280 out[i].Mxxxy = in[i].Mxxxy; 281 out[i].Mxxyy = in[i].Mxxyy; 282 out[i].Mxyyy = in[i].Mxyyy; 283 out[i].Myyyy = in[i].Myyyy; 269 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 270 // with the following. (no real databases used those values -- see 271 // libdvo/doc/dvo-images.txt) 272 out[i].dummy1 = in[i].dummy1; 273 out[i].dummy2 = in[i].dummy2; 274 out[i].dummy3 = in[i].dummy3; 275 out[i].dXpixSys = in[i].dXpixSys; 276 out[i].dYpixSys = in[i].dYpixSys; 277 out[i].dMagSys = in[i].dMagSys; 278 out[i].nFitAstrom = in[i].nFitAstrom; 279 out[i].nFitPhotom = in[i].nFitPhotom; 280 out[i].photom_map_id = in[i].photom_map_id; 281 out[i].astrom_map_id = in[i].astrom_map_id; 284 282 285 283 // changed or added for PS1_V2 … … 297 295 Image_PS1_V1 *out; 298 296 299 ALLOCATE (out, Image_PS1_V1, Nvalues);297 ALLOCATE_ZERO (out, Image_PS1_V1, Nvalues); 300 298 301 299 for (i = 0; i < Nvalues; i++) { … … 333 331 out[i].sourceID = in[i].sourceID; 334 332 335 out[i].order = in[i].order; 336 out[i].Mx = in[i].Mx; 337 out[i].My = in[i].My; 338 out[i].Mxx = in[i].Mxx; 339 out[i].Mxy = in[i].Mxy; 340 out[i].Myy = in[i].Myy; 341 out[i].Mxxx = in[i].Mxxx; 342 out[i].Mxxy = in[i].Mxxy; 343 out[i].Mxyy = in[i].Mxyy; 344 out[i].Myyy = in[i].Myyy; 345 out[i].Mxxxx = in[i].Mxxxx; 346 out[i].Mxxxy = in[i].Mxxxy; 347 out[i].Mxxyy = in[i].Mxxyy; 348 out[i].Mxyyy = in[i].Mxyyy; 349 out[i].Myyyy = in[i].Myyyy; 333 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 334 // with the following. (no real databases used those values -- see 335 // libdvo/doc/dvo-images.txt) 336 out[i].dummy1 = in[i].dummy1; 337 out[i].dummy2 = in[i].dummy2; 338 out[i].dummy3 = in[i].dummy3; 339 out[i].dXpixSys = in[i].dXpixSys; 340 out[i].dYpixSys = in[i].dYpixSys; 341 out[i].dMagSys = in[i].dMagSys; 342 out[i].nFitAstrom = in[i].nFitAstrom; 343 out[i].nFitPhotom = in[i].nFitPhotom; 344 out[i].photom_map_id = in[i].photom_map_id; 345 out[i].astrom_map_id = in[i].astrom_map_id; 350 346 } 351 347 return (out); … … 357 353 PhotCode *out; 358 354 359 ALLOCATE (out, PhotCode, Nvalues);355 ALLOCATE_ZERO (out, PhotCode, Nvalues); 360 356 361 357 for (i = 0; i < Nvalues; i++) { … … 393 389 PhotCode_PS1_V1 *out; 394 390 395 ALLOCATE (out, PhotCode_PS1_V1, Nvalues);391 ALLOCATE_ZERO (out, PhotCode_PS1_V1, Nvalues); 396 392 397 393 for (i = 0; i < Nvalues; i++) { -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c
r27580 r30502 8 8 Measure *out; 9 9 10 ALLOCATE (out, Measure, Nvalues);10 ALLOCATE_ZERO (out, Measure, Nvalues); 11 11 12 12 for (i = 0; i < Nvalues; i++) { … … 47 47 out[i].dXccd = in[i].dXccd; 48 48 out[i].dYccd = in[i].dYccd; 49 out[i].dRsys = in[i].dRsys; 49 50 out[i].posangle = in[i].posangle; 50 51 out[i].pltscale = in[i].pltscale; … … 61 62 Measure_PS1_V2 *out; 62 63 63 ALLOCATE (out, Measure_PS1_V2, Nvalues);64 ALLOCATE_ZERO (out, Measure_PS1_V2, Nvalues); 64 65 65 66 for (i = 0; i < Nvalues; i++) { … … 100 101 out[i].dXccd = in[i].dXccd; 101 102 out[i].dYccd = in[i].dYccd; 102 memset(out[i].pad, 0, sizeof(out[i].pad));103 out[i].dRsys = in[i].dRsys; 103 104 out[i].posangle = in[i].posangle; 104 105 out[i].pltscale = in[i].pltscale; … … 116 117 Average *out; 117 118 118 ALLOCATE (out, Average, Nvalues);119 ALLOCATE_ZERO (out, Average, Nvalues); 119 120 120 121 for (i = 0; i < Nvalues; i++) { … … 156 157 Average_PS1_V2 *out; 157 158 158 ALLOCATE (out, Average_PS1_V2, Nvalues);159 ALLOCATE_ZERO (out, Average_PS1_V2, Nvalues); 159 160 160 161 for (i = 0; i < Nvalues; i++) { … … 195 196 SecFilt *out; 196 197 197 ALLOCATE (out, SecFilt, Nvalues);198 ALLOCATE_ZERO (out, SecFilt, Nvalues); 198 199 199 200 for (i = 0; i < Nvalues; i++) { … … 215 216 SecFilt_PS1_V2 *out; 216 217 217 ALLOCATE (out, SecFilt_PS1_V2, Nvalues);218 ALLOCATE_ZERO (out, SecFilt_PS1_V2, Nvalues); 218 219 219 220 for (i = 0; i < Nvalues; i++) { … … 235 236 Image *out; 236 237 237 ALLOCATE (out, Image, Nvalues);238 ALLOCATE_ZERO (out, Image, Nvalues); 238 239 239 240 for (i = 0; i < Nvalues; i++) { … … 275 276 out[i].sourceID = in[i].sourceID; 276 277 277 out[i].order = in[i].order; 278 out[i].Mx = in[i].Mx; 279 out[i].My = in[i].My; 280 out[i].Mxx = in[i].Mxx; 281 out[i].Mxy = in[i].Mxy; 282 out[i].Myy = in[i].Myy; 283 out[i].Mxxx = in[i].Mxxx; 284 out[i].Mxxy = in[i].Mxxy; 285 out[i].Mxyy = in[i].Mxyy; 286 out[i].Myyy = in[i].Myyy; 287 out[i].Mxxxx = in[i].Mxxxx; 288 out[i].Mxxxy = in[i].Mxxxy; 289 out[i].Mxxyy = in[i].Mxxyy; 290 out[i].Mxyyy = in[i].Mxyyy; 291 out[i].Myyyy = in[i].Myyyy; 278 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 279 // with the following. (no real databases used those values -- see 280 // libdvo/doc/dvo-images.txt) 281 out[i].dummy1 = in[i].dummy1; 282 out[i].dummy2 = in[i].dummy2; 283 out[i].dummy3 = in[i].dummy3; 284 out[i].dXpixSys = in[i].dXpixSys; 285 out[i].dYpixSys = in[i].dYpixSys; 286 out[i].dMagSys = in[i].dMagSys; 287 out[i].nFitAstrom = in[i].nFitAstrom; 288 out[i].nFitPhotom = in[i].nFitPhotom; 289 out[i].photom_map_id = in[i].photom_map_id; 290 out[i].astrom_map_id = in[i].astrom_map_id; 292 291 } 293 292 return (out); … … 299 298 Image_PS1_V2 *out; 300 299 301 ALLOCATE (out, Image_PS1_V2, Nvalues);300 ALLOCATE_ZERO (out, Image_PS1_V2, Nvalues); 302 301 303 302 for (i = 0; i < Nvalues; i++) { … … 339 338 out[i].sourceID = in[i].sourceID; 340 339 341 out[i].order = in[i].order; 342 out[i].Mx = in[i].Mx; 343 out[i].My = in[i].My; 344 out[i].Mxx = in[i].Mxx; 345 out[i].Mxy = in[i].Mxy; 346 out[i].Myy = in[i].Myy; 347 out[i].Mxxx = in[i].Mxxx; 348 out[i].Mxxy = in[i].Mxxy; 349 out[i].Mxyy = in[i].Mxyy; 350 out[i].Myyy = in[i].Myyy; 351 out[i].Mxxxx = in[i].Mxxxx; 352 out[i].Mxxxy = in[i].Mxxxy; 353 out[i].Mxxyy = in[i].Mxxyy; 354 out[i].Mxyyy = in[i].Mxyyy; 355 out[i].Myyyy = in[i].Myyyy; 340 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 341 // with the following. (no real databases used those values -- see 342 // libdvo/doc/dvo-images.txt) 343 out[i].dummy1 = in[i].dummy1; 344 out[i].dummy2 = in[i].dummy2; 345 out[i].dummy3 = in[i].dummy3; 346 out[i].dXpixSys = in[i].dXpixSys; 347 out[i].dYpixSys = in[i].dYpixSys; 348 out[i].dMagSys = in[i].dMagSys; 349 out[i].nFitAstrom = in[i].nFitAstrom; 350 out[i].nFitPhotom = in[i].nFitPhotom; 351 out[i].photom_map_id = in[i].photom_map_id; 352 out[i].astrom_map_id = in[i].astrom_map_id; 356 353 } 357 354 return (out); … … 363 360 PhotCode *out; 364 361 365 ALLOCATE (out, PhotCode, Nvalues);362 ALLOCATE_ZERO (out, PhotCode, Nvalues); 366 363 367 364 for (i = 0; i < Nvalues; i++) { … … 399 396 PhotCode_PS1_V2 *out; 400 397 401 ALLOCATE (out, PhotCode_PS1_V2, Nvalues);398 ALLOCATE_ZERO (out, PhotCode_PS1_V2, Nvalues); 402 399 403 400 for (i = 0; i < Nvalues; i++) { … … 407 404 out[i].code = in[i].code; 408 405 out[i].type = in[i].type; 409 memset(out[i].dummy, 0, sizeof(out[i].dummy));410 406 out[i].C = in[i].C; 411 407 out[i].dC = in[i].dC; -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_elixir.c
r27580 r30502 7 7 Measure *out; 8 8 9 ALLOCATE (out, Measure, Nvalues);9 ALLOCATE_ZERO (out, Measure, Nvalues); 10 10 11 11 for (i = 0; i < Nvalues; i++) { … … 74 74 Measure_Elixir *out; 75 75 76 ALLOCATE (out, Measure_Elixir, Nvalues);76 ALLOCATE_ZERO (out, Measure_Elixir, Nvalues); 77 77 78 78 for (i = 0; i < Nvalues; i++) { … … 113 113 Average *out; 114 114 115 ALLOCATE (out, Average, Nvalues);116 ALLOCATE (*primary, SecFilt, Nvalues);115 ALLOCATE_ZERO (out, Average, Nvalues); 116 ALLOCATE_ZERO (*primary, SecFilt, Nvalues); 117 117 118 118 for (i = 0; i < Nvalues; i++) { … … 168 168 Average_Elixir *out; 169 169 170 ALLOCATE (out, Average_Elixir, Nvalues);170 ALLOCATE_ZERO (out, Average_Elixir, Nvalues); 171 171 172 172 for (i = 0; i < Nvalues; i++) { … … 198 198 SecFilt *out; 199 199 200 ALLOCATE (out, SecFilt, Nvalues);200 ALLOCATE_ZERO (out, SecFilt, Nvalues); 201 201 202 202 for (i = 0; i < Nvalues; i++) { … … 225 225 SecFilt_Elixir *out; 226 226 227 ALLOCATE (out, SecFilt_Elixir, Nvalues);227 ALLOCATE_ZERO (out, SecFilt_Elixir, Nvalues); 228 228 229 229 for (i = 0; i < Nvalues; i++) { … … 243 243 Image *out; 244 244 245 ALLOCATE (out, Image, Nvalues);245 ALLOCATE_ZERO (out, Image, Nvalues); 246 246 247 247 for (i = 0; i < Nvalues; i++) { … … 266 266 out[i].ccdnum = in[i].ccdnum; 267 267 268 out[i].order = in[i].order; 269 out[i].Mx = in[i].Mx; 270 out[i].My = in[i].My; 271 out[i].Mxx = in[i].Mxx; 272 out[i].Mxy = in[i].Mxy; 273 out[i].Myy = in[i].Myy; 274 out[i].Mxxx = in[i].Mxxx; 275 out[i].Mxxy = in[i].Mxxy; 276 out[i].Mxyy = in[i].Mxyy; 277 out[i].Myyy = in[i].Myyy; 278 out[i].Mxxxx = in[i].Mxxxx; 279 out[i].Mxxxy = in[i].Mxxxy; 280 out[i].Mxxyy = in[i].Mxxyy; 281 out[i].Mxyyy = in[i].Mxyyy; 282 out[i].Myyyy = in[i].Myyyy; 268 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 269 // with the following. (no real databases used those values -- see 270 // libdvo/doc/dvo-images.txt) 271 out[i].dummy1 = in[i].dummy1; 272 out[i].dummy2 = in[i].dummy2; 273 out[i].dummy3 = in[i].dummy3; 274 out[i].dXpixSys = in[i].dXpixSys; 275 out[i].dYpixSys = in[i].dYpixSys; 276 out[i].dMagSys = in[i].dMagSys; 277 out[i].nFitAstrom = in[i].nFitAstrom; 278 out[i].nFitPhotom = in[i].nFitPhotom; 279 out[i].photom_map_id = in[i].photom_map_id; 280 out[i].astrom_map_id = in[i].astrom_map_id; 283 281 284 282 // added or changed for PANSTARRS_DEV_0 … … 314 312 Image_Elixir *out; 315 313 316 ALLOCATE (out, Image_Elixir, Nvalues);314 ALLOCATE_ZERO (out, Image_Elixir, Nvalues); 317 315 318 316 for (i = 0; i < Nvalues; i++) { … … 338 336 out[i].ccdnum = in[i].ccdnum; 339 337 340 out[i].order = in[i].order; 341 out[i].Mx = in[i].Mx; 342 out[i].My = in[i].My; 343 out[i].Mxx = in[i].Mxx; 344 out[i].Mxy = in[i].Mxy; 345 out[i].Myy = in[i].Myy; 346 out[i].Mxxx = in[i].Mxxx; 347 out[i].Mxxy = in[i].Mxxy; 348 out[i].Mxyy = in[i].Mxyy; 349 out[i].Myyy = in[i].Myyy; 350 out[i].Mxxxx = in[i].Mxxxx; 351 out[i].Mxxxy = in[i].Mxxxy; 352 out[i].Mxxyy = in[i].Mxxyy; 353 out[i].Mxyyy = in[i].Mxyyy; 354 out[i].Myyyy = in[i].Myyyy; 338 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 339 // with the following. (no real databases used those values -- see 340 // libdvo/doc/dvo-images.txt) 341 out[i].dummy1 = in[i].dummy1; 342 out[i].dummy2 = in[i].dummy2; 343 out[i].dummy3 = in[i].dummy3; 344 out[i].dXpixSys = in[i].dXpixSys; 345 out[i].dYpixSys = in[i].dYpixSys; 346 out[i].dMagSys = in[i].dMagSys; 347 out[i].nFitAstrom = in[i].nFitAstrom; 348 out[i].nFitPhotom = in[i].nFitPhotom; 349 out[i].photom_map_id = in[i].photom_map_id; 350 out[i].astrom_map_id = in[i].astrom_map_id; 355 351 356 352 // added or changed for PANSTARRS_DEV_0 … … 372 368 PhotCode *out; 373 369 374 ALLOCATE (out, PhotCode, Nvalues);370 ALLOCATE_ZERO (out, PhotCode, Nvalues); 375 371 376 372 for (i = 0; i < Nvalues; i++) { … … 412 408 PhotCode_Elixir *out; 413 409 414 ALLOCATE (out, PhotCode_Elixir, Nvalues);410 ALLOCATE_ZERO (out, PhotCode_Elixir, Nvalues); 415 411 416 412 for (i = 0; i < Nvalues; i++) { -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_loneos.c
r27580 r30502 7 7 Measure *out; 8 8 9 ALLOCATE (out, Measure, Nvalues);9 ALLOCATE_ZERO (out, Measure, Nvalues); 10 10 11 11 for (i = 0; i < Nvalues; i++) { … … 76 76 Measure_Loneos *out; 77 77 78 ALLOCATE (out, Measure_Loneos, Nvalues);78 ALLOCATE_ZERO (out, Measure_Loneos, Nvalues); 79 79 80 80 for (i = 0; i < Nvalues; i++) { … … 104 104 Average *out; 105 105 106 ALLOCATE (out, Average, Nvalues);107 ALLOCATE (*primary, SecFilt, Nvalues);106 ALLOCATE_ZERO (out, Average, Nvalues); 107 ALLOCATE_ZERO (*primary, SecFilt, Nvalues); 108 108 109 109 for (i = 0; i < Nvalues; i++) { … … 160 160 Average_Loneos *out; 161 161 162 ALLOCATE (out, Average_Loneos, Nvalues);162 ALLOCATE_ZERO (out, Average_Loneos, Nvalues); 163 163 164 164 for (i = 0; i < Nvalues; i++) { … … 189 189 SecFilt *out; 190 190 191 ALLOCATE (out, SecFilt, Nvalues);191 ALLOCATE_ZERO (out, SecFilt, Nvalues); 192 192 193 193 for (i = 0; i < Nvalues; i++) { … … 218 218 SecFilt_Loneos *out; 219 219 220 ALLOCATE (out, SecFilt_Loneos, Nvalues);220 ALLOCATE_ZERO (out, SecFilt_Loneos, Nvalues); 221 221 222 222 for (i = 0; i < Nvalues; i++) { … … 235 235 Image *out; 236 236 237 ALLOCATE (out, Image, Nvalues);237 ALLOCATE_ZERO (out, Image, Nvalues); 238 238 239 239 for (i = 0; i < Nvalues; i++) { … … 259 259 out[i].ccdnum = in[i].ccdnum; 260 260 261 out[i].order = in[i].order; 262 out[i].Mx = in[i].Mx; 263 out[i].My = in[i].My; 264 out[i].Mxx = in[i].Mxx; 265 out[i].Mxy = in[i].Mxy; 266 out[i].Myy = in[i].Myy; 267 out[i].Mxxx = in[i].Mxxx; 268 out[i].Mxxy = in[i].Mxxy; 269 out[i].Mxyy = in[i].Mxyy; 270 out[i].Myyy = in[i].Myyy; 271 out[i].Mxxxx = in[i].Mxxxx; 272 out[i].Mxxxy = in[i].Mxxxy; 273 out[i].Mxxyy = in[i].Mxxyy; 274 out[i].Mxyyy = in[i].Mxyyy; 275 out[i].Myyyy = in[i].Myyyy; 261 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 262 // with the following. (no real databases used those values -- see 263 // libdvo/doc/dvo-images.txt) 264 out[i].dummy1 = in[i].dummy1; 265 out[i].dummy2 = in[i].dummy2; 266 out[i].dummy3 = in[i].dummy3; 267 out[i].dXpixSys = in[i].dXpixSys; 268 out[i].dYpixSys = in[i].dYpixSys; 269 out[i].dMagSys = in[i].dMagSys; 270 out[i].nFitAstrom = in[i].nFitAstrom; 271 out[i].nFitPhotom = in[i].nFitPhotom; 272 out[i].photom_map_id = in[i].photom_map_id; 273 out[i].astrom_map_id = in[i].astrom_map_id; 276 274 277 275 // added or changed for PANSTARRS_DEV_0 … … 307 305 Image_Loneos *out; 308 306 309 ALLOCATE (out, Image_Loneos, Nvalues);307 ALLOCATE_ZERO (out, Image_Loneos, Nvalues); 310 308 311 309 for (i = 0; i < Nvalues; i++) { … … 331 329 out[i].ccdnum = in[i].ccdnum; 332 330 333 out[i].order = in[i].order; 334 out[i].Mx = in[i].Mx; 335 out[i].My = in[i].My; 336 out[i].Mxx = in[i].Mxx; 337 out[i].Mxy = in[i].Mxy; 338 out[i].Myy = in[i].Myy; 339 out[i].Mxxx = in[i].Mxxx; 340 out[i].Mxxy = in[i].Mxxy; 341 out[i].Mxyy = in[i].Mxyy; 342 out[i].Myyy = in[i].Myyy; 343 out[i].Mxxxx = in[i].Mxxxx; 344 out[i].Mxxxy = in[i].Mxxxy; 345 out[i].Mxxyy = in[i].Mxxyy; 346 out[i].Mxyyy = in[i].Mxyyy; 347 out[i].Myyyy = in[i].Myyyy; 331 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 332 // with the following. (no real databases used those values -- see 333 // libdvo/doc/dvo-images.txt) 334 out[i].dummy1 = in[i].dummy1; 335 out[i].dummy2 = in[i].dummy2; 336 out[i].dummy3 = in[i].dummy3; 337 out[i].dXpixSys = in[i].dXpixSys; 338 out[i].dYpixSys = in[i].dYpixSys; 339 out[i].dMagSys = in[i].dMagSys; 340 out[i].nFitAstrom = in[i].nFitAstrom; 341 out[i].nFitPhotom = in[i].nFitPhotom; 342 out[i].photom_map_id = in[i].photom_map_id; 343 out[i].astrom_map_id = in[i].astrom_map_id; 348 344 349 345 // added or changed for PANSTARRS_DEV_0 -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
r27580 r30502 7 7 Measure *out; 8 8 9 ALLOCATE (out, Measure, Nvalues);9 ALLOCATE_ZERO (out, Measure, Nvalues); 10 10 11 11 for (i = 0; i < Nvalues; i++) { … … 71 71 Measure_Panstarrs_DEV_0 *out; 72 72 73 ALLOCATE (out, Measure_Panstarrs_DEV_0, Nvalues);73 ALLOCATE_ZERO (out, Measure_Panstarrs_DEV_0, Nvalues); 74 74 75 75 for (i = 0; i < Nvalues; i++) { … … 120 120 Average *out; 121 121 122 ALLOCATE (out, Average, Nvalues);122 ALLOCATE_ZERO (out, Average, Nvalues); 123 123 124 124 for (i = 0; i < Nvalues; i++) { … … 165 165 Average_Panstarrs_DEV_0 *out; 166 166 167 ALLOCATE (out, Average_Panstarrs_DEV_0, Nvalues);167 ALLOCATE_ZERO (out, Average_Panstarrs_DEV_0, Nvalues); 168 168 169 169 for (i = 0; i < Nvalues; i++) { … … 200 200 SecFilt *out; 201 201 202 ALLOCATE (out, SecFilt, Nvalues);202 ALLOCATE_ZERO (out, SecFilt, Nvalues); 203 203 204 204 for (i = 0; i < Nvalues; i++) { … … 225 225 SecFilt_Panstarrs_DEV_0 *out; 226 226 227 ALLOCATE (out, SecFilt_Panstarrs_DEV_0, Nvalues);227 ALLOCATE_ZERO (out, SecFilt_Panstarrs_DEV_0, Nvalues); 228 228 229 229 for (i = 0; i < Nvalues; i++) { … … 243 243 Image *out; 244 244 245 ALLOCATE (out, Image, Nvalues);245 ALLOCATE_ZERO (out, Image, Nvalues); 246 246 247 247 for (i = 0; i < Nvalues; i++) { … … 273 273 out[i].ccdnum = in[i].ccdnum; 274 274 275 out[i].order = in[i].order; 276 out[i].Mx = in[i].Mx; 277 out[i].My = in[i].My; 278 out[i].Mxx = in[i].Mxx; 279 out[i].Mxy = in[i].Mxy; 280 out[i].Myy = in[i].Myy; 281 out[i].Mxxx = in[i].Mxxx; 282 out[i].Mxxy = in[i].Mxxy; 283 out[i].Mxyy = in[i].Mxyy; 284 out[i].Myyy = in[i].Myyy; 285 out[i].Mxxxx = in[i].Mxxxx; 286 out[i].Mxxxy = in[i].Mxxxy; 287 out[i].Mxxyy = in[i].Mxxyy; 288 out[i].Mxyyy = in[i].Mxyyy; 289 out[i].Myyyy = in[i].Myyyy; 275 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 276 // with the following. (no real databases used those values -- see 277 // libdvo/doc/dvo-images.txt) 278 out[i].dummy1 = in[i].dummy1; 279 out[i].dummy2 = in[i].dummy2; 280 out[i].dummy3 = in[i].dummy3; 281 out[i].dXpixSys = in[i].dXpixSys; 282 out[i].dYpixSys = in[i].dYpixSys; 283 out[i].dMagSys = in[i].dMagSys; 284 out[i].nFitAstrom = in[i].nFitAstrom; 285 out[i].nFitPhotom = in[i].nFitPhotom; 286 out[i].photom_map_id = in[i].photom_map_id; 287 out[i].astrom_map_id = in[i].astrom_map_id; 290 288 291 289 // changed or added for PS1_DEV_1 … … 314 312 Image_Panstarrs_DEV_0 *out; 315 313 316 ALLOCATE (out, Image_Panstarrs_DEV_0, Nvalues);314 ALLOCATE_ZERO (out, Image_Panstarrs_DEV_0, Nvalues); 317 315 318 316 for (i = 0; i < Nvalues; i++) { … … 344 342 out[i].ccdnum = in[i].ccdnum; 345 343 346 out[i].order = in[i].order; 347 out[i].Mx = in[i].Mx; 348 out[i].My = in[i].My; 349 out[i].Mxx = in[i].Mxx; 350 out[i].Mxy = in[i].Mxy; 351 out[i].Myy = in[i].Myy; 352 out[i].Mxxx = in[i].Mxxx; 353 out[i].Mxxy = in[i].Mxxy; 354 out[i].Mxyy = in[i].Mxyy; 355 out[i].Myyy = in[i].Myyy; 356 out[i].Mxxxx = in[i].Mxxxx; 357 out[i].Mxxxy = in[i].Mxxxy; 358 out[i].Mxxyy = in[i].Mxxyy; 359 out[i].Mxyyy = in[i].Mxyyy; 360 out[i].Myyyy = in[i].Myyyy; 344 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 345 // with the following. (no real databases used those values -- see 346 // libdvo/doc/dvo-images.txt) 347 out[i].dummy1 = in[i].dummy1; 348 out[i].dummy2 = in[i].dummy2; 349 out[i].dummy3 = in[i].dummy3; 350 out[i].dXpixSys = in[i].dXpixSys; 351 out[i].dYpixSys = in[i].dYpixSys; 352 out[i].dMagSys = in[i].dMagSys; 353 out[i].nFitAstrom = in[i].nFitAstrom; 354 out[i].nFitPhotom = in[i].nFitPhotom; 355 out[i].photom_map_id = in[i].photom_map_id; 356 out[i].astrom_map_id = in[i].astrom_map_id; 361 357 362 358 // changed or added for PS1_DEV_1 -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
r27580 r30502 7 7 Measure *out; 8 8 9 ALLOCATE (out, Measure, Nvalues);9 ALLOCATE_ZERO (out, Measure, Nvalues); 10 10 11 11 for (i = 0; i < Nvalues; i++) { … … 71 71 Measure_Panstarrs_DEV_1 *out; 72 72 73 ALLOCATE (out, Measure_Panstarrs_DEV_1, Nvalues);73 ALLOCATE_ZERO (out, Measure_Panstarrs_DEV_1, Nvalues); 74 74 75 75 for (i = 0; i < Nvalues; i++) { … … 120 120 Average *out; 121 121 122 ALLOCATE (out, Average, Nvalues);122 ALLOCATE_ZERO (out, Average, Nvalues); 123 123 124 124 for (i = 0; i < Nvalues; i++) { … … 165 165 Average_Panstarrs_DEV_1 *out; 166 166 167 ALLOCATE (out, Average_Panstarrs_DEV_1, Nvalues);167 ALLOCATE_ZERO (out, Average_Panstarrs_DEV_1, Nvalues); 168 168 169 169 for (i = 0; i < Nvalues; i++) { … … 200 200 SecFilt *out; 201 201 202 ALLOCATE (out, SecFilt, Nvalues);202 ALLOCATE_ZERO (out, SecFilt, Nvalues); 203 203 204 204 for (i = 0; i < Nvalues; i++) { … … 225 225 SecFilt_Panstarrs_DEV_1 *out; 226 226 227 ALLOCATE (out, SecFilt_Panstarrs_DEV_1, Nvalues);227 ALLOCATE_ZERO (out, SecFilt_Panstarrs_DEV_1, Nvalues); 228 228 229 229 for (i = 0; i < Nvalues; i++) { … … 243 243 Image *out; 244 244 245 ALLOCATE (out, Image, Nvalues);245 ALLOCATE_ZERO (out, Image, Nvalues); 246 246 247 247 for (i = 0; i < Nvalues; i++) { … … 273 273 out[i].ccdnum = in[i].ccdnum; 274 274 275 out[i].order = in[i].order; 276 out[i].Mx = in[i].Mx; 277 out[i].My = in[i].My; 278 out[i].Mxx = in[i].Mxx; 279 out[i].Mxy = in[i].Mxy; 280 out[i].Myy = in[i].Myy; 281 out[i].Mxxx = in[i].Mxxx; 282 out[i].Mxxy = in[i].Mxxy; 283 out[i].Mxyy = in[i].Mxyy; 284 out[i].Myyy = in[i].Myyy; 285 out[i].Mxxxx = in[i].Mxxxx; 286 out[i].Mxxxy = in[i].Mxxxy; 287 out[i].Mxxyy = in[i].Mxxyy; 288 out[i].Mxyyy = in[i].Mxyyy; 289 out[i].Myyyy = in[i].Myyyy; 275 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 276 // with the following. (no real databases used those values -- see 277 // libdvo/doc/dvo-images.txt) 278 out[i].dummy1 = in[i].dummy1; 279 out[i].dummy2 = in[i].dummy2; 280 out[i].dummy3 = in[i].dummy3; 281 out[i].dXpixSys = in[i].dXpixSys; 282 out[i].dYpixSys = in[i].dYpixSys; 283 out[i].dMagSys = in[i].dMagSys; 284 out[i].nFitAstrom = in[i].nFitAstrom; 285 out[i].nFitPhotom = in[i].nFitPhotom; 286 out[i].photom_map_id = in[i].photom_map_id; 287 out[i].astrom_map_id = in[i].astrom_map_id; 290 288 291 289 // changed or added for PS1_DEV_1 … … 314 312 Image_Panstarrs_DEV_1 *out; 315 313 316 ALLOCATE (out, Image_Panstarrs_DEV_1, Nvalues);314 ALLOCATE_ZERO (out, Image_Panstarrs_DEV_1, Nvalues); 317 315 318 316 for (i = 0; i < Nvalues; i++) { … … 344 342 out[i].ccdnum = in[i].ccdnum; 345 343 346 out[i].order = in[i].order; 347 out[i].Mx = in[i].Mx; 348 out[i].My = in[i].My; 349 out[i].Mxx = in[i].Mxx; 350 out[i].Mxy = in[i].Mxy; 351 out[i].Myy = in[i].Myy; 352 out[i].Mxxx = in[i].Mxxx; 353 out[i].Mxxy = in[i].Mxxy; 354 out[i].Mxyy = in[i].Mxyy; 355 out[i].Myyy = in[i].Myyy; 356 out[i].Mxxxx = in[i].Mxxxx; 357 out[i].Mxxxy = in[i].Mxxxy; 358 out[i].Mxxyy = in[i].Mxxyy; 359 out[i].Mxyyy = in[i].Mxyyy; 360 out[i].Myyyy = in[i].Myyyy; 344 // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced 345 // with the following. (no real databases used those values -- see 346 // libdvo/doc/dvo-images.txt) 347 out[i].dummy1 = in[i].dummy1; 348 out[i].dummy2 = in[i].dummy2; 349 out[i].dummy3 = in[i].dummy3; 350 out[i].dXpixSys = in[i].dXpixSys; 351 out[i].dYpixSys = in[i].dYpixSys; 352 out[i].dMagSys = in[i].dMagSys; 353 out[i].nFitAstrom = in[i].nFitAstrom; 354 out[i].nFitPhotom = in[i].nFitPhotom; 355 out[i].photom_map_id = in[i].photom_map_id; 356 out[i].astrom_map_id = in[i].astrom_map_id; 361 357 362 358 // changed or added for PS1_DEV_1 -
branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/photfits.c
r15509 r30502 2 2 # define MAX_ORDER 3 3 3 4 /*** * XXXX warning: these functions have not been corrected to handle5 the change of Mcal from millimags to mags6 I don't think most functions are using the Mcal polynomial terms in7 any case... ****/8 9 /* all terms of order > 0 are stored as 16bit floats 10 the zero-order term is stored as a short int (-32k,+32k)*/4 /*** This file contains deprecated functions which were used to implement the 2D zero point variations per image. 5 This code has not been used for a long time, and is not up-to-date wrt the change from 6 millimag shorts to mag floats for values in the db tables. As of 2011.02.03, these 7 structures are no longer used. There is now an (as yet unused) index in the image table 8 to a zero-point map table. Someday, we may need similarly named functions to interact 9 with the ZP map. for now, this file is not used in the build. 10 ***/ 11 11 12 12 /* convert double to low-precision short int */
Note:
See TracChangeset
for help on using the changeset viewer.
