IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34888


Ignore:
Timestamp:
Jan 7, 2013, 4:20:21 PM (14 years ago)
Author:
eugene
Message:

add ubercalDist to ImageSubset

Location:
branches/eam_branches/ipp-20121219/Ohana/src/relphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/Ohana/src/relphot/include/relphot.h

    r34844 r34888  
    107107  unsigned int tzero;
    108108  unsigned char trate;
     109  short ubercalDist;
    109110} ImageSubset;
    110111
  • branches/eam_branches/ipp-20121219/Ohana/src/relphot/src/ImageOps.c

    r34844 r34888  
    9696    image[i].tzero         = input[i].tzero        ;
    9797    image[i].trate         = input[i].trate        ;
     98    image[i].ubercalDist   = input[i].ubercalDist  ;
    9899  }
    99100  LineNumber = line_number;
     
    128129    subset[i].tzero         = image[i].tzero        ;
    129130    subset[i].trate         = image[i].trate        ;
     131    subset[i].ubercalDist   = image[i].ubercalDist  ;
    130132  }
    131133  return subset;
  • branches/eam_branches/ipp-20121219/Ohana/src/relphot/src/ImageSubset.c

    r33963 r34888  
    6565  GET_COLUMN (tzero,   "TZERO",      int);
    6666  GET_COLUMN (trate,   "TRATE",      short);
     67  GET_COLUMN (ucdist,  "UBERCAL_DIST", short);
    6768
    6869  // XXX free the fits table data here
     
    7778    image[i].tzero         = tzero[i];
    7879    image[i].trate         = trate[i];
     80    image[i].ubercalDist   = ucdist[i];
    7981  }
    8082  fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow);
     
    8789  free (tzero);
    8890  free (trate);
     91  free (ucdist);
    8992
    9093  *nimage = Nrow;
     
    124127  gfits_define_bintable_column (&theader, "I", "TRATE", "tti rate", NULL, 1.0, 0.0);
    125128
     129  gfits_define_bintable_column (&theader, "I", "UBERCAL_DIST", "ubercal distance", NULL, 1.0, 1.0*0x80);
     130
    126131  // generate the output array that carries the data
    127132  gfits_create_table (&theader, &ftable);
     
    130135  unsigned int *imageID, *map, *flags, *tzero;
    131136  unsigned short *trate;
     137  short *ucdist;
    132138
    133139  // create intermediate storage arrays
     
    139145  ALLOCATE (tzero,   unsigned int,   Nimage);
    140146  ALLOCATE (trate,   unsigned short, Nimage);
     147  ALLOCATE (ucdist,  short,          Nimage);
    141148
    142149  // assign the storage arrays
     
    149156    tzero[i]   = image[i].tzero;
    150157    trate[i]   = image[i].trate;
     158    ucdist[i]  = image[i].ubercalDist;
    151159  }
    152160
    153161  // add the columns to the output array
    154   gfits_set_bintable_column (&theader, &ftable, "MCAL",       Mcal,    Nimage);
    155   gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR",   dMcal,   Nimage);
    156   gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID",   imageID, Nimage);
    157   gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map,     Nimage);
    158   gfits_set_bintable_column (&theader, &ftable, "FLAGS",      flags,   Nimage);
    159   gfits_set_bintable_column (&theader, &ftable, "TZERO",      tzero,   Nimage);
    160   gfits_set_bintable_column (&theader, &ftable, "TRATE",      trate,   Nimage);
     162  gfits_set_bintable_column (&theader, &ftable, "MCAL",         Mcal,    Nimage);
     163  gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR",     dMcal,   Nimage);
     164  gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID",     imageID, Nimage);
     165  gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP",   map,     Nimage);
     166  gfits_set_bintable_column (&theader, &ftable, "FLAGS",        flags,   Nimage);
     167  gfits_set_bintable_column (&theader, &ftable, "TZERO",        tzero,   Nimage);
     168  gfits_set_bintable_column (&theader, &ftable, "TRATE",        trate,   Nimage);
     169  gfits_set_bintable_column (&theader, &ftable, "UBERCAL_DIST", ucdist,  Nimage);
    161170
    162171  free (Mcal);
     
    167176  free (tzero);
    168177  free (trate);
     178  free (ucdist);
    169179
    170180  FILE *f = fopen (filename, "w");
Note: See TracChangeset for help on using the changeset viewer.