- Timestamp:
- Apr 9, 2015, 8:43:14 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150405/Ohana/src/libdvo/src/dvo_convert.c
r38098 r38100 455 455 return (lensing); } 456 456 457 if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 144)) { 458 Lensing_PS1_V5_R2 *tmpLensing; 459 tmpLensing = gfits_table_get_Lensing_PS1_V5_R2 (ftable, Nlensing, NULL); 460 if (!tmpLensing) { 461 fprintf (stderr, "ERROR: failed to read lensings\n"); 462 exit (2); 463 } 464 lensing = Lensing_PS1_V5_R2_ToInternal (tmpLensing, *Nlensing); 465 free (tmpLensing); 466 *format = DVO_FORMAT_PS1_V5; 467 return (lensing); } 468 469 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \ 470 if (!strcmp (extname, NAME)) { \ 471 fprintf (stderr, "ERROR: format %s not defined for lensing, skipping\n", NAME); \ 472 *Nlensing = 0; \ 473 return NULL; \ 474 } 475 457 476 # define CONVERT_FORMAT(NAME, FORMAT, TYPE) \ 458 477 if (!strcmp (extname, NAME)) { \ … … 468 487 return (lensing); } 469 488 470 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \471 if (!strcmp (extname, NAME)) { \472 fprintf (stderr, "ERROR: format %s not defined for lensing, skipping\n", NAME); \473 *Nlensing = 0; \474 return NULL; \475 }476 477 489 if (!strcmp (extname, "DVO_LENSING")) { 478 490 lensing = gfits_table_get_Lensing (ftable, Nlensing, NULL); … … 496 508 SKIPPING_FORMAT ("DVO_LENSING_PS1_V3", PS1_V3, PS1_V3); 497 509 SKIPPING_FORMAT ("DVO_LENSING_PS1_V4", PS1_V4, PS1_V4); 498 CONVERT_FORMAT ("DVO_LENSING_PS1_V5", PS1_V5, PS1_V5_R 2);510 CONVERT_FORMAT ("DVO_LENSING_PS1_V5", PS1_V5, PS1_V5_R3); 499 511 SKIPPING_FORMAT ("DVO_LENSING_PS1_SIM", PS1_SIM, PS1_SIM); 500 512 # undef CONVERT_FORMAT … … 535 547 // FORMAT_CASE (PS1_V3, PS1_V3); 536 548 // FORMAT_CASE (PS1_V4, PS1_V4); 537 FORMAT_CASE (PS1_V5, PS1_V5_R 2);549 FORMAT_CASE (PS1_V5, PS1_V5_R3); 538 550 # undef FORMAT_CASE 539 551 … … 557 569 return (FALSE); 558 570 } 571 572 if (!strcmp (extname, "DVO_LENSOBJ_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) { 573 Lensobj_PS1_V5_R0 *tmpLensobj; 574 tmpLensobj = gfits_table_get_Lensobj_PS1_V5_R0 (ftable, Nlensobj, NULL); 575 if (!tmpLensobj) { 576 fprintf (stderr, "ERROR: failed to read lensobjs\n"); 577 exit (2); 578 } 579 lensobj = Lensobj_PS1_V5_R0_ToInternal (tmpLensobj, *Nlensobj); 580 free (tmpLensobj); 581 *format = DVO_FORMAT_PS1_V5; 582 return (lensobj); } 559 583 560 584 # define SKIPPING_FORMAT(NAME, FORMAT, TYPE) \ … … 599 623 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V3", PS1_V3, PS1_V3); 600 624 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V4", PS1_V4, PS1_V4); 601 CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V5", PS1_V5, PS1_V5 );625 CONVERT_FORMAT ("DVO_LENSOBJ_PS1_V5", PS1_V5, PS1_V5_R1); 602 626 SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_SIM", PS1_SIM, PS1_SIM); 603 627 # undef CONVERT_FORMAT … … 638 662 // FORMAT_CASE (PS1_V3, PS1_V3); 639 663 // FORMAT_CASE (PS1_V4, PS1_V4); 640 FORMAT_CASE (PS1_V5, PS1_V5 );664 FORMAT_CASE (PS1_V5, PS1_V5_R1); 641 665 # undef FORMAT_CASE 642 666
Note:
See TracChangeset
for help on using the changeset viewer.
