IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39219


Ignore:
Timestamp:
Dec 3, 2015, 4:11:25 PM (11 years ago)
Author:
eugene
Message:

needed modification to handle both old and new ubercal tables

Location:
branches/eam_branches/ipp-20151113/Ohana/src/uniphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20151113/Ohana/src/uniphot/include/setphot.h

    r38986 r39219  
    3636int          IMAGES_ONLY;
    3737int          REPAIR_BY_OBJID;
     38int          SKIP_EXTRA_EXTENSIONS;
    3839
    3940SkyRegion    UserPatch;
  • branches/eam_branches/ipp-20151113/Ohana/src/uniphot/src/initialize_setphot.c

    r38986 r39219  
    4949  if ((N = get_argument (argc, argv, "-reset"))) {
    5050    RESET = TRUE;
     51    remove_argument (N, &argc, argv);
     52  }
     53
     54  SKIP_EXTRA_EXTENSIONS = FALSE;
     55  if ((N = get_argument (argc, argv, "-skip-extra-extensions"))) {
     56    SKIP_EXTRA_EXTENSIONS = TRUE;
    5157    remove_argument (N, &argc, argv);
    5258  }
  • branches/eam_branches/ipp-20151113/Ohana/src/uniphot/src/load_zpt_table.c

    r38986 r39219  
    280280    }
    281281
    282     // ***** skip the extra table segment *****
    283     // load data for this header
    284     if (!gfits_load_header (f, &theader)) return (NULL);
    285 
    286     // read the fits table bytes
    287     if (!gfits_fread_ftable_data (f, &ftable, FALSE)) return (NULL);
     282    // in some versions of ucal, we have extra FITS extensions (for masked chips)
     283    // since Eddie gives no (or almost no) metadata, we have to be told if these exist:
     284
     285    if (SKIP_EXTRA_EXTENSIONS) {
     286      // ***** skip the extra table segment *****
     287      // load data for this header
     288      if (!gfits_load_header (f, &theader)) return (NULL);
     289
     290      // read the fits table bytes
     291      if (!gfits_fread_ftable_data (f, &ftable, FALSE)) return (NULL);
    288292 
    289     // skip over remaining bytes in data segment
    290     fseeko (f, ftable.datasize - ftable.validsize, SEEK_CUR);
     293      // skip over remaining bytes in data segment
     294      fseeko (f, ftable.datasize - ftable.validsize, SEEK_CUR);
     295    }
    291296
    292297    // XXX the initial hacked-together table from Eddie is missing the last 2 elements.  they should be zero
Note: See TracChangeset for help on using the changeset viewer.