IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2015, 4:11:40 PM (11 years ago)
Author:
eugene
Message:

a bit of data structure re-org (load filenames into a structure)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadData.c

    r38501 r38522  
    55
    66// examine the header sets and set the Image entries for the the valid images
    7 int LoadData (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, AddstarClientOptions *options) {
     7int LoadData (FILE *f, AddstarFile *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, AddstarClientOptions *options) {
    88
    9   char *name;
    109  off_t Nskip, Nvalid, NVALID;
    1110  int i, j, Nhead, Ndata;
     
    2221    REALLOCATE (images[0], Image, NVALID);
    2322  }   
    24 
    25   // find image rootname
    26   if (USE_NAME) {
    27       name = filebasename (USE_NAME);
    28   } else {
    29       name = filebasename (file);
    30   }
    3123
    3224  // if zero points are calculated for the full exposure using more than just the matched chip header,
     
    5850    // XXX use something to set the chip name? EXTNAME?
    5951    if (!strcmp(headerSets[i].exthead, "PHU") && (Nimages == 1)) {
    60       snprintf (images[0][Nvalid].name, DVO_IMAGE_NAME_LEN, "%s", name);
     52      snprintf (images[0][Nvalid].name, DVO_IMAGE_NAME_LEN, "%s", file->imagename);
    6153    } else {
    62       snprintf (images[0][Nvalid].name, DVO_IMAGE_NAME_LEN, "%s[%s]", name, headerSets[i].exthead);
     54      snprintf (images[0][Nvalid].name, DVO_IMAGE_NAME_LEN, "%s[%s]", file->imagename, headerSets[i].exthead);
    6355    }
    6456
     
    117109      stars[0][i].measure.Map += OFFSET_ZPT;
    118110    }
    119 
    120111  }
    121112
    122   free (name);
    123113  *nvalid = Nvalid;
    124114  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.