IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27306


Ignore:
Timestamp:
Mar 17, 2010, 11:13:26 AM (16 years ago)
Author:
eugene
Message:

various updates for large files

Location:
branches/eam_branches/largefiles.20100314/Ohana/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/lib.data/fft.c

    r20936 r27306  
    7272// This requires 2(Nx*Ny*...) mem copies, but the fft operations are likely to happen in
    7373// cache.
    74 int fftND (float *x, float *y, int Ndim, int *Nsize, int forward) {
     74int fftND (float *x, float *y, int Ndim, off_t *Nsize, int forward) {
    7575
    7676  int i, nIndex, minor, major, iDim;
  • branches/eam_branches/largefiles.20100314/Ohana/src/relastro/src/UpdateSimple.c

    r15590 r27306  
    44
    55  /* we can measure new image parameters for each non-mosaic chip independently */
    6   int i, Nimage, Nstars;
     6  off_t i, Nimage, Nstars;
    77  Image *image;
    88  StarData *raw, *ref;
  • branches/eam_branches/largefiles.20100314/Ohana/src/relphot/include/relphot.h

    r21508 r27306  
    122122char         *GetPhotnamebyCode   PROTO((PhotCodeData *photcodes, int code));
    123123void          InterpolateGrid     PROTO((float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords));
    124 int          *SelectRefMosaic     PROTO((Mosaic **refmosaic, int *Nimage));
     124off_t        *SelectRefMosaic     PROTO((Mosaic **refmosaic, off_t *Nimage));
    125125int           args                PROTO((int argc, char **argv));
    126126int           bcatalog            PROTO((Catalog *subcatalog, Catalog *catalog));
     
    147147void          free_catalogs       PROTO((Catalog *catalog, int Ncatalog));
    148148int           gcatalog            PROTO((Catalog *catalog, int FINAL));
    149 Coords       *getCoords           PROTO((int meas, int cat));
    150 int           getImageEntry       PROTO((int meas, int cat));
    151 float         getMcal             PROTO((int meas, int cat));
    152 float         getMgrid            PROTO((int meas, int cat));
    153 float         getMmos             PROTO((int meas, int cat));
    154 float         getMrel             PROTO((Catalog *catalog, int meas, int cat));
    155 Image        *getimage            PROTO((int N));
    156 Image        *getimages           PROTO((int *N));
     149Coords       *getCoords           PROTO((off_t meas, int cat));
     150off_t         getImageEntry       PROTO((off_t meas, int cat));
     151float         getMcal             PROTO((off_t meas, int cat));
     152float         getMgrid            PROTO((off_t meas, int cat));
     153float         getMmos             PROTO((off_t meas, int cat));
     154float         getMrel             PROTO((Catalog *catalog, off_t meas, int cat));
     155Image        *getimage            PROTO((off_t N));
     156Image        *getimages           PROTO((off_t *N));
    157157void          global_stats        PROTO((Catalog *catalog, int Ncatalog));
    158158void          initGrid            PROTO((int dX, int dY));
    159159void          initGridBins        PROTO((Catalog *catalog, int Ncatalog));
    160160void          initImageBins       PROTO((Catalog *catalog, int Ncatalog));
    161 void          initImages          PROTO((Image *input, int N));
     161void          initImages          PROTO((Image *input, off_t N));
    162162void          initMosaicBins      PROTO((Catalog *catalog, int Ncatalog));
    163 void          initMosaicGrid      PROTO((Image *image, int Nimage));
    164 void          initMosaics         PROTO((Image *image, int Nimage));
     163void          initMosaicGrid      PROTO((Image *image, off_t Nimage));
     164void          initMosaics         PROTO((Image *image, off_t Nimage));
    165165void          initMrel            PROTO((Catalog *catalog, int Ncatalog));
    166166void          initialize          PROTO((int argc, char **argv));
     
    169169Catalog       *load_catalogs      PROTO((SkyList *skylist, int *Ncatalog));
    170170SkyList      *load_images         PROTO((FITS_DB *db, char *regionName, SkyRegion *region, int RegionSelect));
    171 Image         *select_images      PROTO((SkyList *skylist, Image *timage, int Ntimage, int **LineNumber, int *Nimage));
     171Image         *select_images      PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage));
    172172
    173173int           main                PROTO((int argc, char **argv));
    174 void          mark_images         PROTO((Image *image, int Nimage, Image *timage, int Ntimage));
    175 void          matchImage          PROTO((Catalog *catalog, int meas, int cat));
    176 void          matchMosaics        PROTO((Catalog *catalog, int meas, int cat));
     174void          mark_images         PROTO((Image *image, off_t Nimage, Image *timage, off_t Ntimage));
     175void          matchImage          PROTO((Catalog *catalog, off_t meas, int cat));
     176void          matchMosaics        PROTO((Catalog *catalog, off_t meas, int cat));
    177177double        opening_angle       PROTO((double x1, double y1, double x2, double y2, double x3, double y3));
    178178void          plot_chisq          PROTO((Catalog *catalog, int Ncatalog));
     
    199199int           setMave             PROTO((Catalog *catalog, int Ncatalog));
    200200void          set_ZP              PROTO((double ZERO));
    201 int           setrefcode          PROTO((Image *image, int Nimage));
     201int           setrefcode          PROTO((Image *image, off_t Nimage));
    202202void          skip_measurements   PROTO((Catalog *catalog, int pass));
    203203void          sortA               PROTO((double *X, int N));
  • branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/ImageOps.c

    r21508 r27306  
    33static unsigned int *start;
    44static unsigned int *stop;
    5 static int         **bin;
    6 
    7 static int         **clist;
    8 static int         **mlist;
    9 static int          *Nlist;
    10 static int          *NLIST;
     5static off_t       **bin;
     6
     7static off_t       **clist;
     8static off_t       **mlist;
     9static off_t        *Nlist;
     10static off_t        *NLIST;
    1111
    1212static Image        *image;
    13 static int          Nimage;
    14 
    15 void initImages (Image *input, int N) {
    16 
    17   int i;
     13static off_t        Nimage;
     14
     15void initImages (Image *input, off_t N) {
     16
     17  off_t i;
    1818
    1919  image = input;
     
    3131void initImageBins (Catalog *catalog, int Ncatalog) {
    3232
    33   int i, j;
    34 
    35   ALLOCATE (bin, int *, Ncatalog);
     33  off_t i, j;
     34
     35  ALLOCATE (bin, off_t *, Ncatalog);
    3636  for (i = 0; i < Ncatalog; i++) {
    37     ALLOCATE (bin[i], int, MAX (catalog[i].Nmeasure, 1));
     37    ALLOCATE (bin[i], off_t, MAX (catalog[i].Nmeasure, 1));
    3838    for (j = 0; j < catalog[i].Nmeasure; j++) bin[i][j] = -1;
    3939  }
    4040
    41   ALLOCATE (Nlist, int, Nimage);
    42   ALLOCATE (NLIST, int, Nimage);
    43   ALLOCATE (clist, int *, Nimage);
    44   ALLOCATE (mlist, int *, Nimage);
     41  ALLOCATE (Nlist, off_t, Nimage);
     42  ALLOCATE (NLIST, off_t, Nimage);
     43  ALLOCATE (clist, off_t *, Nimage);
     44  ALLOCATE (mlist, off_t *, Nimage);
    4545
    4646  for (i = 0; i < Nimage; i++) {
    4747    Nlist[i] = 0;
    4848    NLIST[i] = 100;
    49     ALLOCATE (clist[i], int, NLIST[i]);
    50     ALLOCATE (mlist[i], int, NLIST[i]);
     49    ALLOCATE (clist[i], off_t, NLIST[i]);
     50    ALLOCATE (mlist[i], off_t, NLIST[i]);
    5151  }
    5252}
     
    5454void freeImageBins (int Ncatalog) {
    5555
    56   int i;
     56  off_t i;
    5757
    5858  for (i = 0; i < Ncatalog; i++) {
     
    7070/* **** use this to mimic the Mosaic version ***/
    7171# if (0)
    72 void initImageGrid (Image *image, int Nimage) {
     72void initImageGrid (Image *image, off_t Nimage) {
    7373
    7474  /* find max dR, dD range for all mosaics */
     
    7676  /* send results to initGridBins */
    7777
    78   int i, j, m, NX, NY;
     78  off_t i, j, m, NX, NY;
    7979  int dXmax, dYmax;
    8080  double dS, dX, dY;
     
    151151void findImages (Catalog *catalog, int Ncatalog) {
    152152
    153   int i, j, ecode;
     153  off_t j;
     154  int i, ecode;
    154155
    155156  for (i = 0; i < Ncatalog; i++) {
     
    164165/* XXX convert this to use the values of measure->Xccd,Yccd */
    165166/* XXX need to apply the conversion for ELIXIR and LONEOS formats */
    166 void matchImage (Catalog *catalog, int meas, int cat) {
    167 
    168   int i, ccdnum;
     167void matchImage (Catalog *catalog, off_t meas, off_t cat) {
     168
     169  off_t i, ccdnum;
    169170  double X, Y;
    170171  char *pname, *filter, *p, base[256];
     
    220221    if (Nlist[i] == NLIST[i]) {
    221222      NLIST[i] += 100;
    222       REALLOCATE (clist[i], int, NLIST[i]);
    223       REALLOCATE (mlist[i], int, NLIST[i]);
     223      REALLOCATE (clist[i], off_t, NLIST[i]);
     224      REALLOCATE (mlist[i], off_t, NLIST[i]);
    224225    }   
    225226    return;
     
    228229}
    229230
    230 int getImageEntry (int meas, int cat) {
    231 
    232   int i;
     231off_t getImageEntry (off_t meas, off_t cat) {
     232
     233  off_t i;
    233234
    234235  i = bin[cat][meas];
     
    236237}
    237238
    238 float getMcal (int meas, int cat) {
    239 
    240   int i;
     239float getMcal (off_t meas, off_t cat) {
     240
     241  off_t i;
    241242  float value;
    242243
     
    249250}
    250251
    251 Coords *getCoords (int meas, int cat) {
    252 
    253   int i;
     252Coords *getCoords (off_t meas, off_t cat) {
     253
     254  off_t i;
    254255
    255256  i = bin[cat][meas];
     
    261262void setMcal (Catalog *catalog, int PoorImages) {
    262263
    263   int i, j, m, c, n, N, Nmax, mark, bad, Nfew, Nbad, Nmos, Ngrid, Nrel, Nsys;
     264  off_t i, j, m, c, n, N, Nmax, mark, bad, Nfew, Nbad, Nmos, Ngrid, Nrel, Nsys;
    264265  float Msys, Mrel, Mmos, Mgrid;
    265266  double *list, *dlist;
     
    359360void clean_images () {
    360361
    361   int i, N, mark, Nmark;
     362  off_t i, N, mark, Nmark;
    362363  double *mlist, *slist, *dlist;
    363364  double MaxOffset, MaxScatter, MedOffset;
     
    409410void plot_images () {
    410411
    411   int i, bin;
     412  off_t i, bin;
    412413  double *xlist, *Mlist, *dlist;
    413414  Graphdata graphdata;
     
    457458StatType statsImageN (Catalog *catalog) {
    458459
    459   int i, j, m, c, n, N;
     460  off_t i, j, m, c, n, N;
    460461  double *list, *dlist;
    461462  float Mcal, Mmos, Mgrid;
     
    499500StatType statsImageX (Catalog *catalog) {
    500501
    501   int i, n;
     502  off_t i, n;
    502503  double *list, *dlist;
    503504  StatType stats;
     
    527528StatType statsImageM (Catalog *catalog) {
    528529
    529   int i, n;
     530  off_t i, n;
    530531  double *list, *dlist;
    531532  StatType stats;
     
    555556StatType statsImagedM (Catalog *catalog) {
    556557
    557   int i, n;
     558  off_t i, n;
    558559  double *list, *dlist;
    559560  StatType stats;
     
    581582}
    582583
    583 Image *getimages (int *N) {
     584Image *getimages (off_t *N) {
    584585
    585586  *N = Nimage;
     
    587588}
    588589
    589 Image *getimage (int N) {
     590Image *getimage (off_t N) {
    590591  return (&image[N]);
    591592}
  • branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/MosaicOps.c

    r21508 r27306  
    11# include "relphot.h"
    22
    3 Image *getimages (int *N);
    4 
    5 static int    Nmosaic;
     3static off_t  Nmosaic;
    64static Mosaic *mosaic;
    75
    8 static int    *Nimlist;
    9 static int   **imlist; /* mosaic -> image[] */
    10 static int   **bin;    /* catalog, measure -> mosaic */
    11 
    12 static int   **clist;  /* mosaic -> catalog[] */
    13 static int   **mlist;  /* mosiac -> measure[] */
    14 static int    *Nlist;
    15 static int    *NLIST;
     6static off_t  *Nimlist;
     7static off_t   **imlist; /* mosaic -> image[] */
     8static off_t   **bin;    /* catalog, measure -> mosaic */
     9
     10static off_t   **clist;  /* mosaic -> catalog[] */
     11static off_t   **mlist;  /* mosiac -> measure[] */
     12static off_t    *Nlist;
     13static off_t    *NLIST;
    1614
    1715/* find mosaic frames (unique time periods & photcode name matches mosaic) */
    18 void initMosaics (Image *image, int Nimage) {
    19 
    20   int i, j, status, found, NMOSAIC, *NIMLIST;
     16void initMosaics (Image *image, off_t Nimage) {
     17
     18  off_t i, j, status, found, NMOSAIC, *NIMLIST;
    2119  unsigned int start, stop;
    2220  char *pname;
     
    2826  ALLOCATE (mosaic, Mosaic, NMOSAIC);
    2927
    30   ALLOCATE (imlist, int *, NMOSAIC);
    31   ALLOCATE (Nimlist, int, NMOSAIC);
    32   ALLOCATE (NIMLIST, int, NMOSAIC);
     28  ALLOCATE (imlist, off_t *, NMOSAIC);
     29  ALLOCATE (Nimlist, off_t, NMOSAIC);
     30  ALLOCATE (NIMLIST, off_t, NMOSAIC);
    3331
    3432  /* generate list of unique mosaics */
     
    5654      if (Nimlist[j] == NIMLIST[j]) {
    5755        NIMLIST[j] += 10;
    58         REALLOCATE (imlist[j], int, NIMLIST[j]);
     56        REALLOCATE (imlist[j], off_t, NIMLIST[j]);
    5957      }
    6058
     
    7472    NIMLIST[Nmosaic] = 10;
    7573    Nimlist[Nmosaic] = 1;
    76     ALLOCATE (imlist[Nmosaic], int, NIMLIST[Nmosaic]);
     74    ALLOCATE (imlist[Nmosaic], off_t, NIMLIST[Nmosaic]);
    7775    imlist[Nmosaic][0] = i;
    7876
     
    8179      NMOSAIC += 10;
    8280      REALLOCATE (mosaic, Mosaic, NMOSAIC);
    83       REALLOCATE (imlist, int *, NMOSAIC);
    84       REALLOCATE (Nimlist, int, NMOSAIC);
    85       REALLOCATE (NIMLIST, int, NMOSAIC);
     81      REALLOCATE (imlist, off_t *, NMOSAIC);
     82      REALLOCATE (Nimlist, off_t, NMOSAIC);
     83      REALLOCATE (NIMLIST, off_t, NMOSAIC);
    8684    }
    8785  }
     
    9189}
    9290
    93 void initMosaicGrid (Image *image, int Nimage) {
     91void initMosaicGrid (Image *image, off_t Nimage) {
    9492
    9593  /* find max dR, dD range for all mosaics */
     
    9795  /* send results to initGridBins */
    9896
    99   int i, j, m, NX, NY;
     97  off_t i, j, m, NX, NY;
    10098  int dXmax, dYmax;
    10199  double dS, dX, dY;
     
    170168void setMcalFinal () {
    171169
    172   int i, j, im, Nimage;
     170  off_t i, j, im, Nimage;
    173171  Image *image;
    174172
     
    191189void initMosaicBins (Catalog *catalog, int Ncatalog) {
    192190
    193   int i, j;
     191  off_t i, j;
    194192
    195193  /* measure -> mosaic */
    196194  if (!MOSAIC_ZEROPT) return;
    197195
    198   ALLOCATE (bin, int *, Ncatalog);
     196  ALLOCATE (bin, off_t *, Ncatalog);
    199197  for (i = 0; i < Ncatalog; i++) {
    200     ALLOCATE (bin[i], int, MAX (catalog[i].Nmeasure, 1));
     198    ALLOCATE (bin[i], off_t, MAX (catalog[i].Nmeasure, 1));
    201199    for (j = 0; j < catalog[i].Nmeasure; j++) bin[i][j] = -1;
    202200  }
    203201
    204202  /* mosaic -> measure */
    205   ALLOCATE (Nlist, int, Nmosaic);
    206   ALLOCATE (NLIST, int, Nmosaic);
    207   ALLOCATE (clist, int *, Nmosaic);
    208   ALLOCATE (mlist, int *, Nmosaic);
     203  ALLOCATE (Nlist, off_t, Nmosaic);
     204  ALLOCATE (NLIST, off_t, Nmosaic);
     205  ALLOCATE (clist, off_t *, Nmosaic);
     206  ALLOCATE (mlist, off_t *, Nmosaic);
    209207
    210208  for (i = 0; i < Nmosaic; i++) {
    211209    Nlist[i] = 0;
    212210    NLIST[i] = 100;
    213     ALLOCATE (clist[i], int, NLIST[i]);
    214     ALLOCATE (mlist[i], int, NLIST[i]);
     211    ALLOCATE (clist[i], off_t, NLIST[i]);
     212    ALLOCATE (mlist[i], off_t, NLIST[i]);
    215213  }
    216214}
     
    218216void freeMosaicBins (int Ncatalog) {
    219217
    220   int i;
     218  off_t i;
    221219
    222220  /* measure -> mosaic */
     
    241239int findMosaics (Catalog *catalog, int Ncatalog) {
    242240 
    243   int i, j, ecode;
     241  off_t j;
     242  int i, ecode;
    244243
    245244  if (!MOSAIC_ZEROPT) return (FALSE);
     
    259258}
    260259
    261 void matchMosaics (Catalog *catalog, int meas, int cat) {
    262 
    263   int i;
     260void matchMosaics (Catalog *catalog, off_t meas, int cat) {
     261
     262  int off_t;
    264263
    265264  for (i = 0; i < Nmosaic; i++) {
     
    296295}
    297296
    298 float getMmos (int meas, int cat) {
    299 
    300   int i;
     297float getMmos (off_t meas, off_t cat) {
     298
     299  off_t i;
    301300  float value;
    302301
     
    313312int setMmos (Catalog *catalog, int PoorImages) {
    314313
    315   int i, j, m, c, n, N, Nmax, mark, bad, Nfew, Nbad, Ncal, Nrel, Ngrid, Nsys;
     314  off_t i, j, m, c, N, Nmax;
     315  int n, mark, bad, Nfew, Nbad, Ncal, Nrel, Ngrid, Nsys;
    316316  float Msys, Mrel, Mcal, Mgrid;
    317317  double *list, *dlist, *Mlist, *dMlist;
     
    422422StatType statsMosaicM (Catalog *catalog) {
    423423
    424   int i, n;
     424  off_t i;
     425  int n;
    425426  double *list, *dlist;
    426427  StatType stats;
     
    448449StatType statsMosaicdM (Catalog *catalog) {
    449450
    450   int i, n;
     451  off_t i, n;
    451452  double *list, *dlist;
    452453  StatType stats;
     
    476477StatType statsMosaicN (Catalog *catalog) {
    477478
    478   int i, j, m, c, n, N;
     479  off_t i, j, m, c, n, N;
    479480  double *list, *dlist;
    480481  float Mcal, Mgrid, Mrel;
     
    520521StatType statsMosaicX (Catalog *catalog) {
    521522
    522   int i, n;
     523  off_t i, n;
    523524  double *list, *dlist;
    524525  StatType stats;
     
    549550void clean_mosaics () {
    550551
    551   int i, N, mark, Nmark;
     552  off_t i, N, mark, Nmark;
    552553  double *mlist, *slist, *dlist;
    553554  double MaxOffset, MedOffset, MaxScatter;
     
    599600void plot_mosaic_fields (Catalog *catalog) {
    600601
    601   int i, j, m, c, N, ave, Nimage;
     602  off_t i, j, m, c, N, ave, Nimage;
    602603  double *xlist, *ylist;
    603604  double Xmin, Xmax, Ymin, Ymax;
     
    645646void plot_mosaics () {
    646647
    647   int i, bin;
     648  off_t i, bin;
    648649  double *xlist, *Mlist, *dlist;
    649650  Graphdata graphdata;
     
    694695}
    695696
    696 int *SelectRefMosaic (Mosaic **refmosaic, int *Nimage) {
    697 
    698   int i, Imax, Nmax;
     697off_t *SelectRefMosaic (Mosaic **refmosaic, off_t *Nimage) {
     698
     699  off_t i, Imax, Nmax;
    699700
    700701  Imax = 0;
  • branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/bcatalog.c

    r27305 r27306  
    114114
    115115  if (VERBOSE) {
    116     fprintf (stderr, "%d: using %lld stars (%lld measures) for catalog\n", i,
     116    fprintf (stderr, "%lld: using %lld stars (%lld measures) for catalog\n", (long long) i,
    117117             (long long) subcatalog[0].Naverage, (long long) subcatalog[0].Nmeasure);
    118118  }
  • branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/load_images.c

    r27295 r27306  
    44
    55  Image     *image, *subset;
    6   int        Nimage, Nsubset, Nchar;
    7   int       *LineNumber;
     6  off_t      Nimage, Nsubset, Nchar;
     7  off_t     *LineNumber;
    88
    99  SkyTable *sky = NULL;
Note: See TracChangeset for help on using the changeset viewer.