IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38169


Ignore:
Timestamp:
Apr 23, 2015, 3:37:52 PM (11 years ago)
Author:
eugene
Message:

update ukirt mode

Location:
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/LoadDataUKIRT.c

    r38167 r38169  
    44// there should only be a single data set (phu + table) in this file
    55// each SDSS data set corresponds to 5 images (ugriz)
    6 int LoadDataSDSS (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages) {
     6int LoadDataUKIRT (FILE *f, char *file, Image **images, off_t *nimages, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t NheaderSets) {
    77
    88  off_t Nskip, Nvalid, NVALID;
     
    1212  Stars *inStars;
    1313
     14  // create or update image table
    1415  if (images[0] == NULL) {
    1516    Nvalid = 0;
     
    1718    ALLOCATE (images[0], Image, NVALID);
    1819  } else {
    19     Nvalid = *nvalid;
     20    Nvalid = *nimages;
    2021    NVALID = Nvalid + 4;
    2122    REALLOCATE (images[0], Image, NVALID);
     
    2627
    2728  // validate the number of headers sets == 4
    28   for (i = 0; i < 4; i++) {
     29  for (i = 0; i < NheaderSets; i++) {
    2930    if (VERBOSE) fprintf (stderr, "reading header for %s (%s)\n", headerSets[i].exthead, headerSets[i].extdata);
    3031
     
    4243
    4344    free (name);
    44     *nvalid = Nvalid;
     45    *nimages = Nvalid;
    4546  }   
    4647  return (TRUE);
  • branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/MatchHeaders.c

    r38167 r38169  
    1818  mode = GetFileMode (headers[0]);
    1919
     20  // mosaic mef can be identified from the PHU
    2021  if (mode == MOSAIC_MEF) {
    2122    headerSets[Nimage].exthead     = strcreate ("PHU");
     
    2627  }
    2728
     29  // sdss obj can be identified from the PHU
    2830  if (mode == SDSS_OBJ) {
    2931    // XXX these should have two headers (phu + table)
     
    4042
    4143  // check for ukirt mode
    42   if (Nheaders == 5) {
     44  // check if headers[1] is UKIRT_OBJ (and all others)
     45  if (Nheaders > 1) {
    4346    int myMode = GetFileMode (headers[1]);
    4447    if (myMode != UKIRT_OBJ) goto other_modes;
    45     for (i = 2; i < 5; i++) {
     48    for (i = 2; i < Nheaders; i++) {
    4649      myMode = GetFileMode (headers[i]);
    4750      if (myMode != UKIRT_OBJ) {
  • branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/ReadStarsUKIRT.c

    r38167 r38169  
    2828  CODE = code[0].code; \
    2929  ZP = 0.001*code[0].C; }
    30 
    31 // XXX NOTE : as of 2008.02.27, the zero point is still carried internally in millimags
    3230
    3331// given a file with the pointer at the start of the table block and the
Note: See TracChangeset for help on using the changeset viewer.