IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 24, 2010, 11:22:25 AM (16 years ago)
Author:
eugene
Message:

large update merging in changes for Ohana to support large files

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/imregister/imreg/cadc.c

    r16040 r27435  
    44static int REFCCD;
    55
    6 void DumpCADCTable (char *filename, RegImage *image, int *match, int Nmatch) {
    7  
    8   int i, Obsid, Nobsid, Nsubset, ref;
     6void DumpCADCTable (char *filename, RegImage *image, off_t *match, off_t Nmatch) {
     7 
     8  off_t i, Obsid, Nobsid, Nsubset, ref;
    99  char *datestr, *line, hdrname[99];
    1010  time_t tsecond;
     
    1313  FTable table;
    1414  RegImage *row;
    15   int *index, *entry, *obsid;
     15  off_t *index, *entry, *obsid;
    1616  MosaicLayout *layout;
    17   int *subset;
     17  off_t *subset;
    1818  double left, right, center, outer, top, bottom;
    1919  double iqx, iqy, iqr, iqf, iqo;
     
    127127}
    128128
    129 int *GetObsIDSubset (RegImage *image, int start, int *index, int *entry, int Nindex, int *Nsubset) {
    130 
    131   int i, N, NSUBSET;
    132   int *subset;
     129off_t *GetObsIDSubset (RegImage *image, off_t start, off_t *index, off_t *entry, off_t Nindex, off_t *Nsubset) {
     130
     131  off_t i, N, NSUBSET;
     132  off_t *subset;
    133133
    134134  /* create output index */
    135135  N = 0;
    136136  NSUBSET = 64;
    137   ALLOCATE (subset, int, NSUBSET);
     137  ALLOCATE (subset, off_t, NSUBSET);
    138138
    139139  /* find unique sequences */
     
    143143    if (N == NSUBSET) {
    144144      NSUBSET += 64;
    145       REALLOCATE (subset, int, NSUBSET);
     145      REALLOCATE (subset, off_t, NSUBSET);
    146146    }
    147147  }
     
    152152
    153153/* return an index list of unique obs id entries at start of sequence */
    154 int *GetUniqueObsID (RegImage *image, int *index, int *entry, int Nindex, int *Nmatch) {
    155  
    156   int i, j, N, NMATCH;
    157   int *match;
     154off_t *GetUniqueObsID (RegImage *image, off_t *index, off_t *entry, off_t Nindex, off_t *Nmatch) {
     155 
     156  off_t i, j, N, NMATCH;
     157  off_t *match;
    158158
    159159  /* create output index */
    160160  N = 0;
    161161  NMATCH = 1000;
    162   ALLOCATE (match, int, NMATCH);
     162  ALLOCATE (match, off_t, NMATCH);
    163163
    164164  /* find unique sequences */
     
    171171    if (N == NMATCH) {
    172172      NMATCH += 1000;
    173       REALLOCATE (match, int, NMATCH);
     173      REALLOCATE (match, off_t, NMATCH);
    174174    }
    175175
     
    182182
    183183/* return seeing for ccd == REFCCD */
    184 int GetREFCCD (RegImage *image, int *index, int *entry, int Nindex, int start) {
    185  
    186   int i, N, NMATCH;
    187   int *match;
     184off_t GetREFCCD (RegImage *image, off_t *index, off_t *entry, off_t Nindex, off_t start) {
     185 
     186  off_t i, N, NMATCH;
     187  off_t *match;
    188188
    189189  /* create output index */
    190190  N = 0;
    191191  NMATCH = 1000;
    192   ALLOCATE (match, int, NMATCH);
     192  ALLOCATE (match, off_t, NMATCH);
    193193
    194194  /* find unique sequences */
     
    199199}
    200200
    201 void GetObsIDIndex (RegImage *image, int *match, int Nmatch, int **Index, int **Entry) {
    202 
    203   int i;
    204   int *index, *entry;
     201void GetObsIDIndex (RegImage *image, off_t *match, off_t Nmatch, off_t **Index, off_t **Entry) {
     202
     203  off_t i;
     204  off_t *index, *entry;
    205205
    206206  /* index = OBSID */
    207   ALLOCATE (index, int, Nmatch);
    208   ALLOCATE (entry, int, Nmatch);
     207  ALLOCATE (index, off_t, Nmatch);
     208  ALLOCATE (entry, off_t, Nmatch);
    209209  for (i = 0; i < Nmatch; i++) {
    210210    index[i] = atoi (image[match[i]].filename);
     
    212212    entry[i] = match[i];
    213213  }
    214   isortpair (index, entry, Nmatch);
     214  llsortpair (index, entry, Nmatch);
    215215  *Index = index;
    216216  *Entry = entry;
     
    218218
    219219/* match is a list of image entries with the same obsid */
    220 double MosaicIQStats (RegImage *image, int *match, int Nmatch, MosaicRegion *region) {
    221 
    222   int i, j, N, Nccd;
     220double MosaicIQStats (RegImage *image, off_t *match, off_t Nmatch, MosaicRegion *region) {
     221
     222  int i, N, Nccd;
     223  off_t j;
    223224  double *list, value;
    224225
Note: See TracChangeset for help on using the changeset viewer.