Changeset 38354
- Timestamp:
- Jun 2, 2015, 4:52:45 PM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429/src/libdvo/src
- Files:
-
- 2 edited
-
dvo_catalog_split.c (modified) (1 diff)
-
dvo_convert.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog_split.c
r38351 r38354 258 258 259 259 // copies values but does not allocate new memory 260 gfits_copy_header_ptr (&rawheader, ftable->header); 261 gfits_copy_ftable_ptr (&rawtable, ftable); 260 Header *outheader = ftable->header; 261 gfits_copy_header_ptr (&rawheader, outheader); 262 gfits_copy_ftable_ptr (&rawtable, ftable); // this replaces ftable->header 263 ftable->header = outheader; 262 264 *nativeOrder = TRUE; 263 265 } -
branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_convert.c
r38351 r38354 109 109 110 110 if (!strcmp (extname, "DVO_AVERAGE")) { 111 average = gfits_table_get_Average (ftable, Naverage, NULL, NULL);111 average = gfits_table_get_Average (ftable, Naverage, NULL, &nativeBytes); 112 112 if (!average) { 113 113 fprintf (stderr, "ERROR: failed to read averages\n"); … … 227 227 if (!strcmp (extname, NAME)) { \ 228 228 Measure_##TYPE *tmpMeasure; \ 229 tmpMeasure = gfits_table_get_Measure_##TYPE (ftable, Nmeasure, NULL, NULL); \229 tmpMeasure = gfits_table_get_Measure_##TYPE (ftable, Nmeasure, NULL, &nativeBytes); \ 230 230 if (!tmpMeasure) { \ 231 231 fprintf (stderr, "ERROR: failed to read measures\n"); \ … … 239 239 240 240 if (!strcmp (extname, "DVO_MEASURE")) { 241 measure = gfits_table_get_Measure (ftable, Nmeasure, NULL, NULL);241 measure = gfits_table_get_Measure (ftable, Nmeasure, NULL, &nativeBytes); 242 242 if (!measure) { 243 243 fprintf (stderr, "ERROR: failed to read measures\n"); … … 332 332 if (!strcmp (extname, NAME)) { \ 333 333 Missing_##TYPE *tmpMissing; \ 334 tmpMissing = gfits_table_get_Missing_##TYPE (ftable, Nmissing, NULL, NULL); \334 tmpMissing = gfits_table_get_Missing_##TYPE (ftable, Nmissing, NULL, &nativeBytes); \ 335 335 if (!tmpMissing) { \ 336 336 fprintf (stderr, "ERROR: failed to read missing\n"); \ … … 344 344 // XXX the structure is here for future expansion, but no transformations are currently defined 345 345 if (TRUE) { 346 missing = gfits_table_get_Missing (ftable, Nmissing, NULL, NULL);346 missing = gfits_table_get_Missing (ftable, Nmissing, NULL, &nativeBytes); 347 347 if (!missing) { 348 348 fprintf (stderr, "ERROR: failed to read missing\n"); … … 354 354 355 355 if (!strcmp (extname, "DVO_MISSING")) { 356 missing = gfits_table_get_Missing (ftable, Nmissing, NULL, NULL);356 missing = gfits_table_get_Missing (ftable, Nmissing, NULL, &nativeBytes); 357 357 if (!missing) { 358 358 fprintf (stderr, "ERROR: failed to read missing\n"); … … 416 416 if (!strcmp (extname, NAME)) { \ 417 417 SecFilt_##TYPE *tmpSecFilt; \ 418 tmpSecFilt = gfits_table_get_SecFilt_##TYPE (ftable, Nsecfilt, NULL, NULL); \418 tmpSecFilt = gfits_table_get_SecFilt_##TYPE (ftable, Nsecfilt, NULL, &nativeBytes); \ 419 419 if (!tmpSecFilt) { \ 420 420 fprintf (stderr, "ERROR: failed to read secfilts\n"); \ … … 427 427 428 428 if (!strcmp (extname, "DVO_SECFILT")) { 429 secfilt = gfits_table_get_SecFilt (ftable, Nsecfilt, NULL, NULL);429 secfilt = gfits_table_get_SecFilt (ftable, Nsecfilt, NULL, &nativeBytes); 430 430 if (!secfilt) { 431 431 fprintf (stderr, "ERROR: failed to read secfilts\n"); … … 510 510 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 128)) { 511 511 Lensing_PS1_V5_R0 *tmpLensing; 512 tmpLensing = gfits_table_get_Lensing_PS1_V5_R0 (ftable, Nlensing, NULL, NULL);512 tmpLensing = gfits_table_get_Lensing_PS1_V5_R0 (ftable, Nlensing, NULL, &nativeBytes); 513 513 if (!tmpLensing) { 514 514 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 522 522 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) { 523 523 Lensing_PS1_V5_R1 *tmpLensing; 524 tmpLensing = gfits_table_get_Lensing_PS1_V5_R1 (ftable, Nlensing, NULL, NULL);524 tmpLensing = gfits_table_get_Lensing_PS1_V5_R1 (ftable, Nlensing, NULL, &nativeBytes); 525 525 if (!tmpLensing) { 526 526 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 534 534 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 144)) { 535 535 Lensing_PS1_V5_R2 *tmpLensing; 536 tmpLensing = gfits_table_get_Lensing_PS1_V5_R2 (ftable, Nlensing, NULL, NULL);536 tmpLensing = gfits_table_get_Lensing_PS1_V5_R2 (ftable, Nlensing, NULL, &nativeBytes); 537 537 if (!tmpLensing) { 538 538 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 554 554 if (!strcmp (extname, NAME)) { \ 555 555 Lensing_##TYPE *tmpLensing; \ 556 tmpLensing = gfits_table_get_Lensing_##TYPE (ftable, Nlensing, NULL, NULL); \556 tmpLensing = gfits_table_get_Lensing_##TYPE (ftable, Nlensing, NULL, &nativeBytes); \ 557 557 if (!tmpLensing) { \ 558 558 fprintf (stderr, "ERROR: failed to read lensings\n"); \ … … 565 565 566 566 if (!strcmp (extname, "DVO_LENSING")) { 567 lensing = gfits_table_get_Lensing (ftable, Nlensing, NULL, NULL);567 lensing = gfits_table_get_Lensing (ftable, Nlensing, NULL, &nativeBytes); 568 568 if (!lensing) { 569 569 fprintf (stderr, "ERROR: failed to read lensings\n"); … … 649 649 if (!strcmp (extname, "DVO_LENSOBJ_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) { 650 650 Lensobj_PS1_V5_R0 *tmpLensobj; 651 tmpLensobj = gfits_table_get_Lensobj_PS1_V5_R0 (ftable, Nlensobj, NULL, NULL);651 tmpLensobj = gfits_table_get_Lensobj_PS1_V5_R0 (ftable, Nlensobj, NULL, &nativeBytes); 652 652 if (!tmpLensobj) { 653 653 fprintf (stderr, "ERROR: failed to read lensobjs\n"); … … 669 669 if (!strcmp (extname, NAME)) { \ 670 670 Lensobj_##TYPE *tmpLensobj; \ 671 tmpLensobj = gfits_table_get_Lensobj_##TYPE (ftable, Nlensobj, NULL, NULL); \671 tmpLensobj = gfits_table_get_Lensobj_##TYPE (ftable, Nlensobj, NULL, &nativeBytes); \ 672 672 if (!tmpLensobj) { \ 673 673 fprintf (stderr, "ERROR: failed to read lensobjs\n"); \ … … 680 680 681 681 if (!strcmp (extname, "DVO_LENSOBJ")) { 682 lensobj = gfits_table_get_Lensobj (ftable, Nlensobj, NULL, NULL);682 lensobj = gfits_table_get_Lensobj (ftable, Nlensobj, NULL, &nativeBytes); 683 683 if (!lensobj) { 684 684 fprintf (stderr, "ERROR: failed to read lensobjs\n"); … … 772 772 if (!strcmp (extname, NAME)) { \ 773 773 StarPar_##TYPE *tmpStarPar; \ 774 tmpStarPar = gfits_table_get_StarPar_##TYPE (ftable, Nstarpar, NULL, NULL); \774 tmpStarPar = gfits_table_get_StarPar_##TYPE (ftable, Nstarpar, NULL, &nativeBytes); \ 775 775 if (!tmpStarPar) { \ 776 776 fprintf (stderr, "ERROR: failed to read starpar\n"); \ … … 783 783 784 784 if (!strcmp (extname, "DVO_STARPAR")) { 785 starpar = gfits_table_get_StarPar (ftable, Nstarpar, NULL, NULL);785 starpar = gfits_table_get_StarPar (ftable, Nstarpar, NULL, &nativeBytes); 786 786 if (!starpar) { 787 787 fprintf (stderr, "ERROR: failed to read starpar\n"); … … 876 876 if (!strcmp (extname, NAME)) { \ 877 877 GalShape_##TYPE *tmpGalShape; \ 878 tmpGalShape = gfits_table_get_GalShape_##TYPE (ftable, Ngalshape, NULL, NULL); \878 tmpGalShape = gfits_table_get_GalShape_##TYPE (ftable, Ngalshape, NULL, &nativeBytes); \ 879 879 if (!tmpGalShape) { \ 880 880 fprintf (stderr, "ERROR: failed to read galshapes\n"); \ … … 887 887 888 888 if (!strcmp (extname, "DVO_GALSHAPE")) { 889 galshape = gfits_table_get_GalShape (ftable, Ngalshape, NULL, NULL);889 galshape = gfits_table_get_GalShape (ftable, Ngalshape, NULL, &nativeBytes); 890 890 if (!galshape) { 891 891 fprintf (stderr, "ERROR: failed to read galshapes\n");
Note:
See TracChangeset
for help on using the changeset viewer.
