IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 16, 2010, 8:10:48 AM (16 years ago)
Author:
eugene
Message:

more updates for largefiles

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

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/include/addstar.h

    r27295 r27296  
    4646  unsigned int Nstars;
    4747  Stars *stars;
    48   int Nimages;
     48  off_t Nimages;
    4949  Image *images;
    5050  Coords *mosaic;
     
    7676char   PASSWORD[80];
    7777char   HOSTNAME[80];
    78 int    NVALID, *VALID_IP;
     78int    NVALID_IP, *VALID_IP;
    7979char   SKY_TABLE[256];
    8080int    SKY_DEPTH;  /** XXX EAM : depth of catalog tables, fix usage */
     
    167167int        dump_rawstars          PROTO((Stars *stars, unsigned int Nstars));
    168168int        edge_check             PROTO((double *x1, double *y1, double *x2, double *y2));
    169 Image     *fakeimage              PROTO((char *rootname, int *Nimage, int photcode));
     169Image     *fakeimage              PROTO((char *rootname, off_t *Nimage, int photcode));
    170170
    171171int        find_matches                  PROTO((SkyRegion *region, Stars *stars,  unsigned int Nstars, Catalog *catalog, AddstarClientOptions options));
     
    188188Stars     *grefstars              PROTO((char *file, int photcode, unsigned int *Nstars));
    189189
    190 Stars     *LoadStars              PROTO((char *file, unsigned int *Nstars, Image **images, int *Nimages, AddstarClientOptions *options));
     190Stars     *LoadStars              PROTO((char *file, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options));
    191191Header   **LoadHeaders            PROTO((FILE *f, int *mode, int *Nheader));
    192 HeaderSet *MatchHeaders           PROTO((off_t **extsize, int *nimage, int mode, Header **headers, int Nheaders));
    193 int        LoadData               PROTO((FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options));
    194 int        GetZeroPointExposure   PROTO((Header **headers, HeaderSet *headerSets, int Nimages));
     192HeaderSet *MatchHeaders           PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders));
     193int        LoadData               PROTO((FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options));
     194int        GetZeroPointExposure   PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages));
    195195
    196196int        in_image               PROTO((double r, double d, Image *image));
     
    206206Stars     *ReadStarsFITS          PROTO((FILE *f, Header *header, Header *in_theader, unsigned int *nstars));
    207207Stars     *ReadStarsTEXT          PROTO((FILE *f, unsigned int *nstars));
    208 Stars     *ReadStarsSDSS          PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, int *nimages, unsigned int *nstars));
     208Stars     *ReadStarsSDSS          PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, off_t *nimages, unsigned int *nstars));
    209209int        ReadImageHeader        PROTO((Header *header, Image *image, int photcode));
    210210Stars     *FilterStars            PROTO((Stars *instars, Image *image, unsigned int imageID));
     
    232232int        WaitServerSocket       PROTO((int InitSocket, SockAddress *Address, int *validIP, int Nvalid));
    233233int        GetClientSocket        PROTO((char *hostname));
    234 int        UpdateDatabase_Image   PROTO((AddstarClientOptions *options, Image *images, int Nimages, Coords *mosaic, Stars *stars, unsigned int Nstars));
     234int        UpdateDatabase_Image   PROTO((AddstarClientOptions *options, Image *images, off_t Nimages, Coords *mosaic, Stars *stars, unsigned int Nstars));
    235235int        UpdateDatabase_Reflist PROTO((AddstarClientOptions *options, Stars *stars, unsigned int Nstars));
    236236int        UpdateDatabase_Refcat  PROTO((AddstarClientOptions *options, SkyRegion *UserPatch, char *refcat));
     
    259259int args_skycells (int argc, char **argv);
    260260int ConfigInit_skycells (int *argc, char **argv);
    261 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, int Nimages);
    262 int LoadDataSDSS (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages);
    263 int altaz (double *alt, double *az, double ha, double dec, double latitude);
    264 
    265 int LoadDataPMM (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars);
     261int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, off_t Nimages);
     262
     263int 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);
     264int LoadDataPMM (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars);
     265
    266266PhotCode *LoadMetadataPMM (char *datafile, Image *image);
    267267time_t pmm_date_to_sec (char *date, char *time);
     
    273273uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID);
    274274uint64_t CreatePSPSObjectID(double ra, double dec);
     275
     276int altaz (double *alt, double *az, double ha, double dec, double latitude);
    275277
    276278// this is a gnu extension?? caution!
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ConfigInit.c

    r25757 r27296  
    130130  /* load valid ip list */
    131131  {
    132     int i, Nvalid, ip1, ip2, ip3, ip4, test, status;
     132    int i, Nvalid_IP, ip1, ip2, ip3, ip4, test, status;
    133133    char string[80];
    134134
    135     Nvalid = 0;
    136     NVALID = 10;
    137     ALLOCATE (VALID_IP, int, NVALID);
     135    Nvalid_IP = 0;
     136    NVALID_IP = 10;
     137    ALLOCATE (VALID_IP, int, NVALID_IP);
    138138    for (i = 0; ScanConfig (config, "VALID_IP", "%s", i, string) != NULL; i++) {
    139139      status = sscanf (string, "%d.%d.%d.%d", &ip1, &ip2, &ip3, &ip4);
     
    148148        exit (2);
    149149      }
    150       VALID_IP[Nvalid] = ip1 | (ip2 << 8) | (ip3 << 16) | (ip4 << 24);
    151       Nvalid ++;
    152       CHECK_REALLOCATE (VALID_IP, int, NVALID, Nvalid, 10);
    153     }
    154     NVALID = Nvalid;
    155     REALLOCATE (VALID_IP, int, NVALID);
    156     if (NVALID == 0) {
     150      VALID_IP[Nvalid_IP] = ip1 | (ip2 << 8) | (ip3 << 16) | (ip4 << 24);
     151      Nvalid_IP ++;
     152      CHECK_REALLOCATE (VALID_IP, int, NVALID_IP, Nvalid_IP, 10);
     153    }
     154    NVALID_IP = Nvalid_IP;
     155    REALLOCATE (VALID_IP, int, NVALID_IP);
     156    if (NVALID_IP == 0) {
    157157      free (VALID_IP);
    158158      VALID_IP = NULL;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/GetZeroPointExposure.c

    r25908 r27296  
    2121// offset in ReadImageHeader based on the per-chip zero points in the photcode database
    2222
    23 int GetZeroPointExposure (Header **headers, HeaderSet *headerSets, int Nimages) {
     23int GetZeroPointExposure (Header **headers, HeaderSet *headerSets, off_t Nimages) {
    2424
    2525    // the zero point correction is not applied
     
    3737    // the zero point correction is measured here and applied in ReadImageHeader
    3838    if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_AVERAGE")) {
     39
    3940        int i, Nzpt, Nmid, Nhead;
    4041        float *zpt, ZPT_OBS;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ImageOptions.c

    r16810 r27296  
    22
    33/* set specific options based on the image collection */
    4 int ImageOptions (AddstarClientOptions *options, Image *images, int Nimages) {
     4int ImageOptions (AddstarClientOptions *options, Image *images, off_t Nimages) {
    55
    6   int i, equivPhotcode, consistent;
     6  off_t i;
     7  int equivPhotcode, consistent;
    78  float maxError;
    89  PhotCode *photcode;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ListenClients_Thread.c

    r6674 r27296  
    1414
    1515    /* wait for clients to make connection */
    16     BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID);
     16    BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID_IP);
    1717    if (BindSocket == -1) continue;
    1818
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadData.c

    r27295 r27296  
    66
    77// examine the header sets and set the Image entries for the the valid images
    8 int LoadData (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages, AddstarClientOptions *options) {
     8int 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) {
    99
    1010  char *name;
    11   off_t Nskip;
    12   int i, j, Nvalid, Nhead, Ndata;
     11  off_t Nskip, Nvalid, NVALID;
     12  int i, j, Nhead, Ndata;
    1313  uint32_t parentID = UINT32_MAX;
    1414  Stars *inStars;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadDataPMM.c

    r27295 r27296  
    1616# define MAG_INDEX_ASC 22
    1717
    18 int LoadDataPMM (FILE *f, char *file, Image **images, int *nvalid, Stars **stars, unsigned int *Nstars) {
    19 
     18int LoadDataPMM (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars) {
     19
     20  off_t Nvalid, NVALID;
    2021  char *name, *buffer;
    21   int i, fd, Nbyte, Nline, Nvalid, code;
     22  int i, fd, Nbyte, Nline, code;
    2223  double ra, dec, mag, airmass, az, ZeroPoint, ZeroPt;
    2324  unsigned int Ninstars, NINSTARS;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadDataSDSS.c

    r27295 r27296  
    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, int *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int Nimages) {
     6int 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) {
    77
    8   off_t Nskip;
     8  off_t Nskip, Nvalid, NVALID;
    99  char *name;
    10   int j, Nvalid, Nhead, Ndata;
     10  int j, Nhead, Ndata;
    1111  unsigned int Ninstars;
    1212  Stars *inStars;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/LoadStars.c

    r27295 r27296  
    11# include "addstar.h"
    22
    3 Stars *LoadStars (char *filename, unsigned int *Nstars, Image **images, int *Nimages, AddstarClientOptions *options) {
     3Stars *LoadStars (char *filename, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options) {
    44
    5   off_t *extsize;
    6   int i, Nfile, NFILE, Nheaders, NheaderSets, mode;
     5  off_t *extsize, NheaderSets;
     6  int i, Nfile, NFILE, Nheaders, mode;
    77  char **file, line[1024];
    88  FILE *f;
     
    8181      continue;
    8282    }
    83     if (VERBOSE) fprintf (stderr, "file %s has %d headers, including %d images\n", file[i], Nheaders, NheaderSets);
     83    if (VERBOSE) fprintf (stderr, "file %s has %d headers, including %lld images\n", file[i], Nheaders, (long long) NheaderSets);
    8484
    8585    /* supplied photcode is incompatible with multi-chip images */
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/MatchHeaders.c

    r27295 r27296  
    33// XXX largely psphot specific
    44
    5 HeaderSet *MatchHeaders (off_t **extsize, int *nimage, int mode, Header **headers, int Nheaders) {
     5HeaderSet *MatchHeaders (off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders) {
    66
    77  int i, j, Nimage, NIMAGE;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ReadStarsFITS.c

    r27295 r27296  
    6060Stars *Convert_SMPDATA (FTable *table, unsigned int *nstars) {
    6161
    62   unsigned int i, Nstars;
     62  off_t Nstars;
     63  unsigned int i;
    6364  char swapped;
    6465  double ZeroPt;
     
    100101Stars *Convert_PS1_DEV_0 (FTable *table, unsigned int *nstars) {
    101102
    102   unsigned int i, Nstars;
     103  off_t Nstars;
     104  unsigned int i;
    103105  double ZeroPt;
    104106  Stars *stars;
     
    144146Stars *Convert_PS1_DEV_1 (FTable *table, unsigned int *nstars) {
    145147
    146   unsigned int i, Nstars;
     148  off_t Nstars;
     149  unsigned int i;
    147150  double ZeroPt;
    148151  Stars *stars;
     
    189192Stars *Convert_PS1_V1 (FTable *table, unsigned int *nstars) {
    190193
    191   unsigned int i, Nstars;
     194  off_t Nstars;
     195  unsigned int i;
    192196  double ZeroPt;
    193197  Stars *stars;
     
    265269Stars *Convert_PS1_V1_Alt (FTable *table, unsigned int *nstars) {
    266270
    267   unsigned int i, Nstars;
     271  off_t Nstars;
     272  unsigned int i;
    268273  double ZeroPt;
    269274  Stars *stars;
     
    336341Stars *Convert_PS1_V2 (FTable *table, unsigned int *nstars) {
    337342
    338   unsigned int i, Nstars;
     343  off_t Nstars;
     344  unsigned int i;
    339345  double ZeroPt;
    340346  Stars *stars;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/ReadStarsSDSS.c

    r27295 r27296  
    3131// given a file with the pointer at the start of the table block and the
    3232// corresponding image header, load the stars from the table
    33 Stars *ReadStarsSDSS (FILE *f, char *name, Header *header, Header *in_theader, Image *images, int *nimages, unsigned int *nstars) {
    34 
    35   off_t Nskip;
     33Stars *ReadStarsSDSS (FILE *f, char *name, Header *header, Header *in_theader, Image *images, off_t *nimages, unsigned int *nstars) {
     34
     35  off_t Nskip, Nrow;
    3636  int i, j, N, Nstars, camcol;
    3737  char type[80];
     
    4444  char filtname[16][5];
    4545  int photcode[5];
    46   int Nrow, Ncol; // used in the GET_COLUMN_1,5 macros above
     46  int Ncol; // used in the GET_COLUMN_1,5 macros above
    4747 
    4848  if (in_theader == NULL) {
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/UpdateImageIDs.c

    r27295 r27296  
    11# include "addstar.h"
    22
    3 int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, int Nimages) {
     3int UpdateImageIDs (Stars *stars, unsigned int Nstars, Image *images, off_t Nimages) {
    44
    55  int i, status, isEmpty;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/addstar.c

    r27295 r27296  
    66  unsigned int Nstars, Nsubset;
    77  int Nmatch, status, loadObjects;
    8   int i, Nimages;
     8  off_t i, Nimages;
    99  off_t Naverage, Nmeasure;
    1010  Stars *stars, **subset;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/addstard.c

    r25757 r27296  
    2323
    2424    /* wait for clients to make connection */
    25     BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID);
     25    BindSocket = WaitServerSocket (InitSocket, &Address, VALID_IP, NVALID_ID);
    2626    if (BindSocket == -1) continue;
    2727
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/fakeimage.c

    r21508 r27296  
    11# include "addstar.h"
    22
    3 Image *fakeimage (char *rootname, int *Nimage, int photcode) {
     3Image *fakeimage (char *rootname, off_t *Nimage, int photcode) {
    44
    55  int i, j, Nx, Ny, Nchips;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/getgsc.c

    r27295 r27296  
    99Stars *getgsc (SkyRegion *patch, unsigned int *NSTARS) {
    1010 
    11   int i, Ngsc, Nstars;
     11  unsigned int i, Ngsc, Nstars;
    1212  Stars *gsc;
    1313  Stars *stars;
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/greference.c

    r27295 r27296  
    55Stars *greference (char *Refcat, SkyRegion *region, int photcode, unsigned int *nstars) {
    66
    7   int Nstars;
     7  unsigned int Nstars;
    88  Stars *stars;
    99
  • branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/sky_tessalation.c

    r23914 r27296  
    947947  }
    948948  REALLOCATE (db[0].vtable.buffer, char *, 1);
    949   REALLOCATE (db[0].vtable.row, int, 1);
     949  REALLOCATE (db[0].vtable.row, off_t, 1);
    950950  db[0].vtable.Nrow   = 0;
    951951
  • branches/eam_branches/largefiles.20100314/Ohana/src/gastro/src/gfit.c

    r27295 r27296  
    77int gfit (SStars *stars1, SStars *stars2, int N1, int N2, Coords *coords, int NX, int NY, double *Radius, double *DR, int *Nmatch, int mode) {
    88 
    9   int i, j, iteration, Niter, last, halt, first_j, *Nextra, extras;
     9  int i, j, iteration, Niter, last, halt, first_j, extras;
    1010  off_t *tmpN1, *tmpN2;
    1111  double X_O, X_X, X_Y, dX;
     
    4242  ALLOCATE (tmpX1, double, N1);
    4343  ALLOCATE (tmpY1, double, N1);
    44   ALLOCATE (tmpN1, int, N1);
     44  ALLOCATE (tmpN1, off_t, N1);
    4545 
    4646  ALLOCATE (tmpX2, double, N2);
    4747  ALLOCATE (tmpY2, double, N2);
    48   ALLOCATE (tmpN2, int, N2);
    49   ALLOCATE (Nextra, int, N2);
    50   bzero (Nextra, sizeof(int) * N2);
     48  ALLOCATE (tmpN2, off_t, N2);
    5149
    5250  dX = dY = N = 0;
  • branches/eam_branches/largefiles.20100314/Ohana/src/gastro/src/gfitpoly.c

    r27295 r27296  
    5252  ALLOCATE (tmpX1, double, N1);
    5353  ALLOCATE (tmpY1, double, N1);
    54   ALLOCATE (tmpN1, int, N1);
     54  ALLOCATE (tmpN1, off_t, N1);
    5555
    5656  ALLOCATE (tmpX2, double, N2);
    5757  ALLOCATE (tmpY2, double, N2);
    58   ALLOCATE (tmpN2, int, N2);
     58  ALLOCATE (tmpN2, off_t, N2);
    5959
    6060  /* assign and sort list */
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/include/dvoImageExtract.h

    r21153 r27296  
    3030
    3131int  WriteImageFITS (FILE *f, Image *image);
    32 int  WriteImages (char *filename, Image *images, int Nimages, int *matches, int Nmatches);
    33 int *SelectImages (char *filename, Image *dbImages, int NdbImages, int *Nmatch);
     32int  WriteImages (char *filename, Image *images, off_t Nimages, off_t *matches, off_t Nmatches);
     33off_t *SelectImages (char *filename, Image *dbImages, off_t NdbImages, off_t *Nmatch);
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/include/dvoImageOverlaps.h

    r21153 r27296  
    2929int  SetSignals       PROTO((void));
    3030
    31 Image *ReadImageFiles (char *filename, int *Nimages);
     31Image *ReadImageFiles (char *filename, off_t *Nimages);
    3232int ReadImageHeader (Header *header, Image *image);
    33 int *MatchImage (Image *dbImages, int NdbImages, Image *image, int *Nmatch);
    34 int ListImageOverlaps (Image *dbImages, Image *image, int *matches, int Nmatches);
     33off_t *MatchImage (Image *dbImages, off_t NdbImages, Image *image, off_t *Nmatch);
     34int ListImageOverlaps (Image *dbImages, Image *image, off_t *matches, off_t Nmatches);
    3535
    3636int GetFileMode (Header *header);
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/include/dvoImagesAtCoords.h

    r26288 r27296  
    4444int  SetSignals       PROTO((void));
    4545
    46 Image *ReadImageFiles (char *filename, int *Nimages);
     46Image *ReadImageFiles (char *filename, off_t *Nimages);
    4747int ReadImageHeader (Header *header, Image *image);
    48 int MatchCoords(Image *, int, Point *, int);
     48off_t MatchCoords (Image *dbImages, off_t NdbImages, Point *points, int Npoints);
    4949
    5050int GetFileMode (Header *header);
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ConfigInit_coords.c

    r27142 r27296  
    44
    55  char *config, *file;
    6   char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    86
    97  /*** load configuration info ***/
     
    2119  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    2220  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    23   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    2421  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) {
    2522    SKY_DEPTH = 2;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ConfigInit_extract.c

    r25757 r27296  
    44
    55  char *config, *file;
    6   char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    86
    97  /*** load configuration info ***/
     
    2119  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    2220  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    23   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    2421  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) {
    2522    SKY_DEPTH = 2;
     
    3330  if (*CATFORMAT == 0) strcpy (CATFORMAT, "ELIXIR");
    3431
    35   /* XXX this does not yet write out the master photcode table */
    36   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    37   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    38     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
    39     exit (1);
    40   }
    41 
    4232  free (config);
    4333  free (file);
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ConfigInit_overlaps.c

    r25757 r27296  
    44
    55  char *config, *file;
    6   char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    86
    97  /*** load configuration info ***/
     
    2119  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    2220  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    23   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    2421  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) {
    2522    SKY_DEPTH = 2;
     
    3330  if (*CATFORMAT == 0) strcpy (CATFORMAT, "ELIXIR");
    3431
    35   /* XXX this does not yet write out the master photcode table */
    36   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    37   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, FALSE)) {
    38     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
    39     exit (1);
    40   }
    41 
    4232  free (config);
    4333  free (file);
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ListImageOverlaps.c

    r12774 r27296  
    22
    33/* given image, find catalog images which overlap it */
    4 int ListImageOverlaps (Image *dbImages, Image *image, int *matches, int Nmatches) {
     4int ListImageOverlaps (Image *dbImages, Image *image, off_t *matches, off_t Nmatches) {
    55 
    6   int i, N;
     6  off_t i, N;
    77
    88  for (i = 0; i < Nmatches; i++) {
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/MatchCoords.c

    r26142 r27296  
    55
    66/* given coordinate, find images in list that contain the point */
    7 int MatchCoords (Image *dbImages, int NdbImages, Point *points, int Npoints) {
     7off_t MatchCoords (Image *dbImages, off_t NdbImages, Point *points, int Npoints) {
    88 
    9   int i, j, N;
     9  off_t i;
     10  int j;
    1011  int totalMatches = 0;
    11   Coords tcoords;
    12   double r, d;
    13   double Xi[4], Yi[4], Xo[4], Yo[4];  /* image and original corners */
    14   double Xmin, Xmax, Ymin, Ymax;
     12  double Xi[4], Yi[4];  /* image and original corners */
    1513  double xmin, xmax, ymin, ymax;
    1614
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/MatchImages.c

    r14590 r27296  
    55
    66/* given image, find catalog images which overlap it */
    7 int *MatchImage (Image *dbImages, int NdbImages, Image *image, int *Nmatch) {
     7off_t *MatchImage (Image *dbImages, off_t NdbImages, Image *image, off_t *Nmatch) {
    88 
    9   int i, j, N, addtolist, status;
    10   int NMATCH, nmatch, *match;
     9  off_t i, NMATCH, nmatch, *match;
     10  int j, N, addtolist, status;
    1111  Coords tcoords;
    1212  double r, d;
     
    6464  nmatch = 0;
    6565  NMATCH = 20;
    66   ALLOCATE (match, int, NMATCH);
     66  ALLOCATE (match, off_t, NMATCH);
    6767
    6868  /* setup links for mosaic WRP and DIS entries */
     
    128128    if (nmatch == NMATCH) {
    129129      NMATCH += 20;
    130       REALLOCATE (match, int, NMATCH);
     130      REALLOCATE (match, off_t, NMATCH);
    131131    }
    132132  }
    133133 
    134   if (VERBOSE) fprintf (stderr, "found %d overlapping images\n", nmatch);
     134  if (VERBOSE) fprintf (stderr, "found %lld overlapping images\n", (long long) nmatch);
    135135
    136136  *Nmatch = nmatch;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/ReadImageFiles.c

    r27295 r27296  
    22# define DVO_IMAGE_NAME_LEN 128
    33
    4 Image *ReadImageFiles (char *filename, int *Nimages) {
     4Image *ReadImageFiles (char *filename, off_t *Nimages) {
    55
    66  off_t Nskip, *extsize;
    77  int i, j, N, Nfile, Nheader, Nimage, NHEADER, NIMAGE;
    8   int Nskip, Nhead, Ndata, done, status, mode;
     8  int Nhead, Ndata, done, status, mode;
    99  char **file, *name;
    1010  FILE *f;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/SelectImages.c

    r14590 r27296  
    22
    33/* given image, find catalog images which overlap it */
    4 int *SelectImages (char *filename, Image *images, int Nimages, int *Nmatch) {
     4off_t *SelectImages (char *filename, Image *images, off_t Nimages, off_t *Nmatch) {
    55 
    6   int i, Nchar;
    7   int NMATCH, nmatch, *match;
     6  int Nchar;
     7  off_t i, NMATCH, nmatch, *match;
    88
    99  /* matches here are only based on string comparisons */
     
    1212  nmatch = 0;
    1313  NMATCH = 20;
    14   ALLOCATE (match, int, NMATCH);
     14  ALLOCATE (match, off_t, NMATCH);
    1515
    1616  /* setup links for mosaic WRP and DIS entries */
     
    2727    if (nmatch == NMATCH) {
    2828      NMATCH += 20;
    29       REALLOCATE (match, int, NMATCH);
     29      REALLOCATE (match, off_t, NMATCH);
    3030    }
    3131  } 
    3232
    33   if (VERBOSE) fprintf (stderr, "found %d matching images\n", nmatch);
     33  if (VERBOSE) fprintf (stderr, "found %lld matching images\n", (long long) nmatch);
    3434
    3535  *Nmatch = nmatch;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/WriteImages.c

    r14590 r27296  
    22
    33/* given image, find catalog images which overlap it */
    4 int WriteImages (char *filename, Image *images, int Nimages, int *matches, int Nmatches) {
     4int WriteImages (char *filename, Image *images, off_t Nimages, off_t *matches, off_t Nmatches) {
    55 
    66  int i, N;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/dvoImageExtract.c

    r14590 r27296  
    33int main (int argc, char **argv) {
    44
    5   int Nimages, status;
    6   int Nmatches, *matches;
     5  off_t Nimages, Nmatches, *matches;
     6  int status;
    77  Image *images;
    88  FITS_DB db;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/dvoImageOverlaps.c

    r14590 r27296  
    33int main (int argc, char **argv) {
    44
    5   int i, Nimages, NdbImages, status;
    6   int Nmatches, *matches;
     5  off_t NdbImages, Nimages;
     6  int status;
     7  off_t i, Nmatches, *matches;
    78  Image *images, *dbImages;
    89  FITS_DB db;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/dvoImagesAtCoords.c

    r26288 r27296  
    1212int main (int argc, char **argv) {
    1313
    14   int i, Nimages, NdbImages, status;
    15   int Nmatches, *matches;
     14  off_t NdbImages;
     15  int status;
    1616  Image *dbImages;
    1717  int Npoints;
  • branches/eam_branches/largefiles.20100314/Ohana/src/getstar/src/select_by_region.c

    r20266 r27296  
    156156  output[0].Nsecf_mem = Nave*Nsecfilt;
    157157
    158   fprintf (stderr, "output catalog has %d stars (%d measures, %d secfilt)\n",
    159            output[0].Naverage, output[0].Nmeasure, output[0].Nsecfilt);
     158  fprintf (stderr, "output catalog has %lld stars (%lld measures, %d secfilt)\n",
     159           (long long) output[0].Naverage, (long long) output[0].Nmeasure, output[0].Nsecfilt);
    160160  return (TRUE);
    161161}
  • branches/eam_branches/largefiles.20100314/Ohana/src/imregister/imphot/rtext.c

    r27295 r27296  
    2121    Ndata = (filestatus.st_size - db[0].header.datasize) / sizeof (Image);
    2222    if (VERBOSE) fprintf (stderr, "ERROR: image catalog has inconsistent size\n");
    23     if (VERBOSE) fprintf (stderr, "header: %d, data: %d\n", Nimage, Ndata);
     23    if (VERBOSE) fprintf (stderr, "header: %lld, data: %d\n", (long long) Nimage, Ndata);
    2424    if (!FORCE_READ) exit (1);
    2525    Nimage = Ndata;
  • branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/LoadPicture.c

    r27295 r27296  
    8585  fcntl (sock, F_SETFL, !O_NONBLOCK); 
    8686
    87   if (DEBUG) fprintf (stderr, "read %d bytes\n", image[0].image[0].matrix.datasize);
    88   /* it it not obvious this condition should kill kii, but ... */
     87  if (DEBUG) fprintf (stderr, "read %lld bytes\n", (long long) image[0].image[0].matrix.datasize);
     88  /* it it not obvious this condition should kill kapa, but ... */
    8989  if (image[0].image[0].matrix.datasize != header.datasize) { 
    90     fprintf (stderr, "error: expected %lld bytes, but got only %lld\n", header.datasize, image[0].image[0].matrix.datasize);
     90    fprintf (stderr, "error: expected %lld bytes, but got only %lld\n", (long long) header.datasize, (long long) image[0].image[0].matrix.datasize);
    9191    return (FALSE);
    9292  }
  • branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/PNGit.c

    r26891 r27296  
    99  int Npalette;
    1010  char filename[1024];
    11   int Nbytes, status;
    1211  bDrawBuffer *buffer;
    1312  Graphic *graphic;
  • branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/PPMit.c

    r26891 r27296  
    55  FILE *f;
    66  char *line, filename[1024];
    7   int Nbytes, status, dx, dy, i, j, Npalette, color;
     7  int dx, dy, i, j, Npalette, color;
    88  png_color *palette;
    99  bDrawBuffer *buffer;
  • branches/eam_branches/largefiles.20100314/Ohana/src/kapa2/src/Relocate.c

    r25757 r27296  
    44int Relocate (int sock) {
    55 
    6   int i, Nsection;
    76  int x, y, dX, dY;
    87  Graphic *graphic;
    9   Section *section;
    108
    119  graphic = GetGraphic();
  • branches/eam_branches/largefiles.20100314/Ohana/src/libdvo/include/dvo.h

    r27295 r27296  
    282282
    283283int isRegisteredMosaic (void);
    284 int GetRegisteredMosaic (void);
     284off_t GetRegisteredMosaic (void);
    285285int GetMosaicCoords (Coords *coords);
    286 int FindMosaicForImage (Image *images, int Nimages, int entry);
    287 int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry);
    288 int FindMosaicForImage_MatchSearch (Image *images, int Nimages, int entry);
    289 int BuildChipMatch (Image *images, int Nimages);
     286int FindMosaicForImage (Image *images, off_t Nimages, off_t entry);
     287int FindMosaicForImage_TableSearch (Image *images, off_t Nimages, off_t entry);
     288int FindMosaicForImage_MatchSearch (Image *images, off_t Nimages, off_t entry);
     289int BuildChipMatch (Image *images, off_t Nimages);
    290290void SetImageCorners (double *X, double *Y, Image *image);
    291291
  • branches/eam_branches/largefiles.20100314/Ohana/src/libdvo/src/mosaic_astrom.c

    r21047 r27296  
    33/* chip-match table: j = ChipMatch[i], images[j] is DIS for images[i] WRP */
    44
    5 static int    iDIS = -1;      // DIS entry in ChipMatch[]
    6 static int    Ndis = 0;
    7 static int    *DISentry = NULL;
     5static off_t  iDIS = -1;      // DIS entry in ChipMatch[]
     6static off_t  Ndis = 0;
     7static off_t  *DISentry = NULL;
    88static e_time *DIStzero = NULL;
    9 static int    *ChipMatch = NULL;
     9static off_t  *ChipMatch = NULL;
    1010
    1111/* what is the currently registered mosaic image? */
    12 int GetRegisteredMosaic () {
     12off_t GetRegisteredMosaic () {
    1313  return (iDIS);
    1414}
    1515
    1616/* given an image array and a current entry of type WRP, find matching DIS & Register it */
    17 int FindMosaicForImage (Image *images, int Nimages, int entry) {
     17int FindMosaicForImage (Image *images, off_t Nimages, off_t entry) {
    1818
    1919  int status;
     
    2828
    2929/* given an image array and a current entry of type WRP, find matching DIS & Register it */
    30 int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry) {
     30int FindMosaicForImage_TableSearch (Image *images, off_t Nimages, off_t entry) {
    3131
    3232  e_time tzero;
    33   int i;
     33  off_t i;
    3434
    3535  /* search backwards for image with same time and type DIS */
     
    6565
    6666/* given an image array and a current entry of type WRP, find matching DIS & Register it */
    67 int FindMosaicForImage_MatchSearch (Image *images, int Nimages, int entry) {
     67int FindMosaicForImage_MatchSearch (Image *images, off_t Nimages, off_t entry) {
    6868
    69   int N;
     69  off_t N;
    7070
    7171  if (strcmp(&images[entry].coords.ctype[4], "-WRP")) {
     
    8585}
    8686
    87 int BuildChipMatch (Image *images, int Nimages) {
     87int BuildChipMatch (Image *images, off_t Nimages) {
    8888
    89   int i, j, NDIS;
     89  off_t i, j, NDIS;
    9090
    9191  if (DISentry != NULL) free (DISentry);
     
    9696  Ndis = 0;
    9797  NDIS = 100;
    98   ALLOCATE (DISentry, int, NDIS);
     98  ALLOCATE (DISentry, off_t, NDIS);
    9999  ALLOCATE (DIStzero, e_time, NDIS);
    100100
     
    106106    if (Ndis >= NDIS) {
    107107      NDIS += 100;
    108       REALLOCATE (DISentry, int, NDIS);
     108      REALLOCATE (DISentry, off_t, NDIS);
    109109      REALLOCATE (DIStzero, e_time, NDIS);
    110110    }
     
    112112
    113113  /* find all matched WRP images */
    114   ALLOCATE (ChipMatch, int, Nimages);
     114  ALLOCATE (ChipMatch, off_t, Nimages);
    115115  for (i = 0; i < Nimages; i++) {
    116116    ChipMatch[i] = -1;
  • branches/eam_branches/largefiles.20100314/Ohana/src/mosastro/src/rfits.c

    r27295 r27296  
    3030  }
    3131
    32   stars = gfits_table_get_SMPData (&table, &mychip[0].Nstars, NULL);
     32  off_t Nstars;
     33  stars = gfits_table_get_SMPData (&table, &Nstars, NULL);
     34  mychip[0].Nstars = Nstars;
    3335  gfits_scan (table.header, "NAXIS1", "%d", 1, &Nx);
    3436
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/imdata.c

    r20936 r27296  
    33int imdata (int argc, char **argv) {
    44 
    5   int i, j, k, I;
    6   int Nimage, N, NPTS, found, mode, TimeSelect;
    7   int n, Nregions, NREGIONS, TimeFormat;
    8   int *subset, Nsubset;
     5  off_t i, j, k, n, I;
     6  int N, NPTS, found, mode, TimeSelect, TimeFormat;
     7  off_t Nregions, NREGIONS;
     8  off_t *subset, Nsubset, Nimage;
    99  double trange;
    1010  time_t tzero, start, stop, TimeReference;
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/lcurve.c

    r27295 r27296  
    88  int kapa, TimeFormat;
    99  int found, AutoLimits, ErrorBars, GalMag, AbsPhot, SaveVectors;
    10   off_t i, Nstars, *N1;
    11   int j, m, N, NPTS;
     10  off_t i, j, m, Nstars, *N1;
     11  int N, NPTS;
    1212  time_t TimeReference;
    1313  struct tm *timeptr;
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/lightcurve.c

    r27295 r27296  
    55  double Ra, Dec, Radius, Radius2, r;
    66  double *RA, *DEC;
    7   off_t i, Nstars, *N1;
     7  off_t i, j, k, m, Nstars, *N1;
    88  int found, PhotCodeSelect;
    9   int j, k, m, N, NPTS, Nsecfilt, RELPHOT, TimeFormat;
     9  int N, NPTS, Nsecfilt, RELPHOT, TimeFormat;
    1010  time_t TimeReference;
    1111
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/mextract.c

    r26285 r27296  
    33int mextract (int argc, char **argv) {
    44 
    5   int i, j, k, m, n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
     5  off_t i, j, k, m; // used for counter averages and measures
     6  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
    67  int Nsecfilt, VERBOSE, loadImages, mosaicMode;
    78  char **cstack, name[1024];
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/mmextract.c

    r24233 r27296  
    33int mmextract (int argc, char **argv) {
    44 
    5   int i, j, k, m, n, N, Npts, NPTS, last, next, state;
     5  off_t i, j, k, m;
     6  int n, N, Npts, NPTS, last, next, state;
    67  int Nfields, Nreturn, Nreturn_base, Ncstack1, Ncstack2, Nstack1, Nstack2;
    78  int Nwhere, Iwhere, Nmatch, Imatch, NTABLE, Nt1, Nt2, n1, n2;
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/pmeasure.c

    r21508 r27296  
    77 
    88  FILE *f;
    9   int i, j, k, m, kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded;
     9  off_t i, j, k, m;
     10  int kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded;
    1011  double Mz, Mr, mag;
    1112  double Radius, Rmin, Rmax, R, D, trange;
  • branches/eam_branches/largefiles.20100314/Ohana/src/opihi/dvo/subpix.c

    r27295 r27296  
    33int subpix (int argc, char **argv) {
    44 
    5   int i, j, I, Nlo, Nhi, *entry, Nentry;
    6   off_t *index, Nstars, Nimage, Nmeasure;
    7   int Nmin, Nsub, NSUB, status;
    8   int TimeFormat;
     5  off_t Nlo, Nhi, *entry, Nentry;
     6  off_t j, i, I, *index, Nstars, Nimage, Nmeasure;
     7  off_t Nmin, Nsub, NSUB;
     8  int status, TimeFormat;
    99  time_t Timage, TimeReference;
    1010  double X, Y, Mabs, t;
     
    6565  Nlo = bracket (DEC, Nstars, FALSE, Dec - Radius);
    6666  Nhi = bracket (DEC, Nstars, TRUE,  Dec + Radius);
    67   ALLOCATE (entry, int, MAX (Nhi - Nlo, 1));
     67  ALLOCATE (entry, off_t, MAX (Nhi - Nlo, 1));
    6868  Nentry = 0;
    6969
     
    111111  Nsub = 0;
    112112  NSUB = 100;
    113   ALLOCATE (index, int, NSUB);
     113  ALLOCATE (index, off_t, NSUB);
    114114
    115115  /* load all images, extract those touching Ra, Dec */
     
    125125    if (Nsub == NSUB - 1) {
    126126      NSUB += 100;
    127       REALLOCATE (index, int, NSUB);
     127      REALLOCATE (index, off_t, NSUB);
    128128    }
    129129  }
Note: See TracChangeset for help on using the changeset viewer.