IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38354


Ignore:
Timestamp:
Jun 2, 2015, 4:52:45 PM (11 years ago)
Author:
eugene
Message:

fix up the various references to nativeOrder

Location:
branches/eam_branches/ohana.20150429/src/libdvo/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog_split.c

    r38351 r38354  
    258258   
    259259    // 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;
    262264    *nativeOrder = TRUE;
    263265  }
  • branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_convert.c

    r38351 r38354  
    109109
    110110  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);
    112112    if (!average) {
    113113      fprintf (stderr, "ERROR: failed to read averages\n");
     
    227227  if (!strcmp (extname, NAME)) {                                        \
    228228    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); \
    230230        if (!tmpMeasure) {                                              \
    231231          fprintf (stderr, "ERROR: failed to read measures\n");         \
     
    239239
    240240  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);
    242242    if (!measure) {
    243243      fprintf (stderr, "ERROR: failed to read measures\n");
     
    332332  if (!strcmp (extname, NAME)) {                                        \
    333333    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); \
    335335    if (!tmpMissing) {                                                  \
    336336      fprintf (stderr, "ERROR: failed to read missing\n");              \
     
    344344  // XXX the structure is here for future expansion, but no transformations are currently defined
    345345  if (TRUE) {
    346     missing = gfits_table_get_Missing (ftable, Nmissing, NULL, NULL);
     346    missing = gfits_table_get_Missing (ftable, Nmissing, NULL, &nativeBytes);
    347347    if (!missing) {
    348348      fprintf (stderr, "ERROR: failed to read missing\n");
     
    354354
    355355  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);
    357357    if (!missing) {
    358358      fprintf (stderr, "ERROR: failed to read missing\n");
     
    416416  if (!strcmp (extname, NAME)) { \
    417417    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); \
    419419    if (!tmpSecFilt) { \
    420420      fprintf (stderr, "ERROR: failed to read secfilts\n"); \
     
    427427
    428428  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);
    430430    if (!secfilt) {
    431431      fprintf (stderr, "ERROR: failed to read secfilts\n");
     
    510510  if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 128)) {
    511511    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);
    513513    if (!tmpLensing) {                                                 
    514514      fprintf (stderr, "ERROR: failed to read lensings\n");             
     
    522522  if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) {
    523523    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);
    525525    if (!tmpLensing) {                                                 
    526526      fprintf (stderr, "ERROR: failed to read lensings\n");             
     
    534534  if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 144)) {
    535535    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);
    537537    if (!tmpLensing) {                                                 
    538538      fprintf (stderr, "ERROR: failed to read lensings\n");             
     
    554554  if (!strcmp (extname, NAME)) {                                        \
    555555    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); \
    557557    if (!tmpLensing) {                                                  \
    558558      fprintf (stderr, "ERROR: failed to read lensings\n");             \
     
    565565
    566566  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);
    568568    if (!lensing) {
    569569      fprintf (stderr, "ERROR: failed to read lensings\n");
     
    649649  if (!strcmp (extname, "DVO_LENSOBJ_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) {
    650650    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);
    652652    if (!tmpLensobj) {                                                 
    653653      fprintf (stderr, "ERROR: failed to read lensobjs\n");             
     
    669669  if (!strcmp (extname, NAME)) {                                        \
    670670    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); \
    672672    if (!tmpLensobj) {                                                  \
    673673      fprintf (stderr, "ERROR: failed to read lensobjs\n");             \
     
    680680
    681681  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);
    683683    if (!lensobj) {
    684684      fprintf (stderr, "ERROR: failed to read lensobjs\n");
     
    772772  if (!strcmp (extname, NAME)) {                                        \
    773773    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); \
    775775    if (!tmpStarPar) {                                                  \
    776776      fprintf (stderr, "ERROR: failed to read starpar\n");              \
     
    783783
    784784  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);
    786786    if (!starpar) {
    787787      fprintf (stderr, "ERROR: failed to read starpar\n");
     
    876876  if (!strcmp (extname, NAME)) {                                        \
    877877    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); \
    879879    if (!tmpGalShape) {                                                 \
    880880      fprintf (stderr, "ERROR: failed to read galshapes\n");            \
     
    887887
    888888  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);
    890890    if (!galshape) {
    891891      fprintf (stderr, "ERROR: failed to read galshapes\n");
Note: See TracChangeset for help on using the changeset viewer.