Changeset 27306
- Timestamp:
- Mar 17, 2010, 11:13:26 AM (16 years ago)
- Location:
- branches/eam_branches/largefiles.20100314/Ohana/src
- Files:
-
- 7 edited
-
opihi/lib.data/fft.c (modified) (1 diff)
-
relastro/src/UpdateSimple.c (modified) (1 diff)
-
relphot/include/relphot.h (modified) (4 diffs)
-
relphot/src/ImageOps.c (modified) (20 diffs)
-
relphot/src/MosaicOps.c (modified) (22 diffs)
-
relphot/src/bcatalog.c (modified) (1 diff)
-
relphot/src/load_images.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/largefiles.20100314/Ohana/src/opihi/lib.data/fft.c
r20936 r27306 72 72 // This requires 2(Nx*Ny*...) mem copies, but the fft operations are likely to happen in 73 73 // cache. 74 int fftND (float *x, float *y, int Ndim, int *Nsize, int forward) {74 int fftND (float *x, float *y, int Ndim, off_t *Nsize, int forward) { 75 75 76 76 int i, nIndex, minor, major, iDim; -
branches/eam_branches/largefiles.20100314/Ohana/src/relastro/src/UpdateSimple.c
r15590 r27306 4 4 5 5 /* we can measure new image parameters for each non-mosaic chip independently */ 6 int i, Nimage, Nstars;6 off_t i, Nimage, Nstars; 7 7 Image *image; 8 8 StarData *raw, *ref; -
branches/eam_branches/largefiles.20100314/Ohana/src/relphot/include/relphot.h
r21508 r27306 122 122 char *GetPhotnamebyCode PROTO((PhotCodeData *photcodes, int code)); 123 123 void InterpolateGrid PROTO((float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords)); 124 int *SelectRefMosaic PROTO((Mosaic **refmosaic, int *Nimage));124 off_t *SelectRefMosaic PROTO((Mosaic **refmosaic, off_t *Nimage)); 125 125 int args PROTO((int argc, char **argv)); 126 126 int bcatalog PROTO((Catalog *subcatalog, Catalog *catalog)); … … 147 147 void free_catalogs PROTO((Catalog *catalog, int Ncatalog)); 148 148 int 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));149 Coords *getCoords PROTO((off_t meas, int cat)); 150 off_t getImageEntry PROTO((off_t meas, int cat)); 151 float getMcal PROTO((off_t meas, int cat)); 152 float getMgrid PROTO((off_t meas, int cat)); 153 float getMmos PROTO((off_t meas, int cat)); 154 float getMrel PROTO((Catalog *catalog, off_t meas, int cat)); 155 Image *getimage PROTO((off_t N)); 156 Image *getimages PROTO((off_t *N)); 157 157 void global_stats PROTO((Catalog *catalog, int Ncatalog)); 158 158 void initGrid PROTO((int dX, int dY)); 159 159 void initGridBins PROTO((Catalog *catalog, int Ncatalog)); 160 160 void initImageBins PROTO((Catalog *catalog, int Ncatalog)); 161 void initImages PROTO((Image *input, int N));161 void initImages PROTO((Image *input, off_t N)); 162 162 void initMosaicBins PROTO((Catalog *catalog, int Ncatalog)); 163 void initMosaicGrid PROTO((Image *image, int Nimage));164 void initMosaics PROTO((Image *image, int Nimage));163 void initMosaicGrid PROTO((Image *image, off_t Nimage)); 164 void initMosaics PROTO((Image *image, off_t Nimage)); 165 165 void initMrel PROTO((Catalog *catalog, int Ncatalog)); 166 166 void initialize PROTO((int argc, char **argv)); … … 169 169 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog)); 170 170 SkyList *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));171 Image *select_images PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage)); 172 172 173 173 int 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));174 void mark_images PROTO((Image *image, off_t Nimage, Image *timage, off_t Ntimage)); 175 void matchImage PROTO((Catalog *catalog, off_t meas, int cat)); 176 void matchMosaics PROTO((Catalog *catalog, off_t meas, int cat)); 177 177 double opening_angle PROTO((double x1, double y1, double x2, double y2, double x3, double y3)); 178 178 void plot_chisq PROTO((Catalog *catalog, int Ncatalog)); … … 199 199 int setMave PROTO((Catalog *catalog, int Ncatalog)); 200 200 void set_ZP PROTO((double ZERO)); 201 int setrefcode PROTO((Image *image, int Nimage));201 int setrefcode PROTO((Image *image, off_t Nimage)); 202 202 void skip_measurements PROTO((Catalog *catalog, int pass)); 203 203 void sortA PROTO((double *X, int N)); -
branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/ImageOps.c
r21508 r27306 3 3 static unsigned int *start; 4 4 static unsigned int *stop; 5 static int**bin;6 7 static int**clist;8 static int**mlist;9 static int*Nlist;10 static int*NLIST;5 static off_t **bin; 6 7 static off_t **clist; 8 static off_t **mlist; 9 static off_t *Nlist; 10 static off_t *NLIST; 11 11 12 12 static Image *image; 13 static intNimage;14 15 void initImages (Image *input, int N) {16 17 int i;13 static off_t Nimage; 14 15 void initImages (Image *input, off_t N) { 16 17 off_t i; 18 18 19 19 image = input; … … 31 31 void initImageBins (Catalog *catalog, int Ncatalog) { 32 32 33 int i, j;34 35 ALLOCATE (bin, int *, Ncatalog);33 off_t i, j; 34 35 ALLOCATE (bin, off_t *, Ncatalog); 36 36 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)); 38 38 for (j = 0; j < catalog[i].Nmeasure; j++) bin[i][j] = -1; 39 39 } 40 40 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); 45 45 46 46 for (i = 0; i < Nimage; i++) { 47 47 Nlist[i] = 0; 48 48 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]); 51 51 } 52 52 } … … 54 54 void freeImageBins (int Ncatalog) { 55 55 56 int i;56 off_t i; 57 57 58 58 for (i = 0; i < Ncatalog; i++) { … … 70 70 /* **** use this to mimic the Mosaic version ***/ 71 71 # if (0) 72 void initImageGrid (Image *image, int Nimage) {72 void initImageGrid (Image *image, off_t Nimage) { 73 73 74 74 /* find max dR, dD range for all mosaics */ … … 76 76 /* send results to initGridBins */ 77 77 78 int i, j, m, NX, NY;78 off_t i, j, m, NX, NY; 79 79 int dXmax, dYmax; 80 80 double dS, dX, dY; … … 151 151 void findImages (Catalog *catalog, int Ncatalog) { 152 152 153 int i, j, ecode; 153 off_t j; 154 int i, ecode; 154 155 155 156 for (i = 0; i < Ncatalog; i++) { … … 164 165 /* XXX convert this to use the values of measure->Xccd,Yccd */ 165 166 /* 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;167 void matchImage (Catalog *catalog, off_t meas, off_t cat) { 168 169 off_t i, ccdnum; 169 170 double X, Y; 170 171 char *pname, *filter, *p, base[256]; … … 220 221 if (Nlist[i] == NLIST[i]) { 221 222 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]); 224 225 } 225 226 return; … … 228 229 } 229 230 230 int getImageEntry (int meas, int cat) {231 232 int i;231 off_t getImageEntry (off_t meas, off_t cat) { 232 233 off_t i; 233 234 234 235 i = bin[cat][meas]; … … 236 237 } 237 238 238 float getMcal ( int meas, int cat) {239 240 int i;239 float getMcal (off_t meas, off_t cat) { 240 241 off_t i; 241 242 float value; 242 243 … … 249 250 } 250 251 251 Coords *getCoords ( int meas, int cat) {252 253 int i;252 Coords *getCoords (off_t meas, off_t cat) { 253 254 off_t i; 254 255 255 256 i = bin[cat][meas]; … … 261 262 void setMcal (Catalog *catalog, int PoorImages) { 262 263 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; 264 265 float Msys, Mrel, Mmos, Mgrid; 265 266 double *list, *dlist; … … 359 360 void clean_images () { 360 361 361 int i, N, mark, Nmark;362 off_t i, N, mark, Nmark; 362 363 double *mlist, *slist, *dlist; 363 364 double MaxOffset, MaxScatter, MedOffset; … … 409 410 void plot_images () { 410 411 411 int i, bin;412 off_t i, bin; 412 413 double *xlist, *Mlist, *dlist; 413 414 Graphdata graphdata; … … 457 458 StatType statsImageN (Catalog *catalog) { 458 459 459 int i, j, m, c, n, N;460 off_t i, j, m, c, n, N; 460 461 double *list, *dlist; 461 462 float Mcal, Mmos, Mgrid; … … 499 500 StatType statsImageX (Catalog *catalog) { 500 501 501 int i, n;502 off_t i, n; 502 503 double *list, *dlist; 503 504 StatType stats; … … 527 528 StatType statsImageM (Catalog *catalog) { 528 529 529 int i, n;530 off_t i, n; 530 531 double *list, *dlist; 531 532 StatType stats; … … 555 556 StatType statsImagedM (Catalog *catalog) { 556 557 557 int i, n;558 off_t i, n; 558 559 double *list, *dlist; 559 560 StatType stats; … … 581 582 } 582 583 583 Image *getimages ( int *N) {584 Image *getimages (off_t *N) { 584 585 585 586 *N = Nimage; … … 587 588 } 588 589 589 Image *getimage ( int N) {590 Image *getimage (off_t N) { 590 591 return (&image[N]); 591 592 } -
branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/MosaicOps.c
r21508 r27306 1 1 # include "relphot.h" 2 2 3 Image *getimages (int *N); 4 5 static int Nmosaic; 3 static off_t Nmosaic; 6 4 static Mosaic *mosaic; 7 5 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;6 static off_t *Nimlist; 7 static off_t **imlist; /* mosaic -> image[] */ 8 static off_t **bin; /* catalog, measure -> mosaic */ 9 10 static off_t **clist; /* mosaic -> catalog[] */ 11 static off_t **mlist; /* mosiac -> measure[] */ 12 static off_t *Nlist; 13 static off_t *NLIST; 16 14 17 15 /* 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;16 void initMosaics (Image *image, off_t Nimage) { 17 18 off_t i, j, status, found, NMOSAIC, *NIMLIST; 21 19 unsigned int start, stop; 22 20 char *pname; … … 28 26 ALLOCATE (mosaic, Mosaic, NMOSAIC); 29 27 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); 33 31 34 32 /* generate list of unique mosaics */ … … 56 54 if (Nimlist[j] == NIMLIST[j]) { 57 55 NIMLIST[j] += 10; 58 REALLOCATE (imlist[j], int, NIMLIST[j]);56 REALLOCATE (imlist[j], off_t, NIMLIST[j]); 59 57 } 60 58 … … 74 72 NIMLIST[Nmosaic] = 10; 75 73 Nimlist[Nmosaic] = 1; 76 ALLOCATE (imlist[Nmosaic], int, NIMLIST[Nmosaic]);74 ALLOCATE (imlist[Nmosaic], off_t, NIMLIST[Nmosaic]); 77 75 imlist[Nmosaic][0] = i; 78 76 … … 81 79 NMOSAIC += 10; 82 80 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); 86 84 } 87 85 } … … 91 89 } 92 90 93 void initMosaicGrid (Image *image, int Nimage) {91 void initMosaicGrid (Image *image, off_t Nimage) { 94 92 95 93 /* find max dR, dD range for all mosaics */ … … 97 95 /* send results to initGridBins */ 98 96 99 int i, j, m, NX, NY;97 off_t i, j, m, NX, NY; 100 98 int dXmax, dYmax; 101 99 double dS, dX, dY; … … 170 168 void setMcalFinal () { 171 169 172 int i, j, im, Nimage;170 off_t i, j, im, Nimage; 173 171 Image *image; 174 172 … … 191 189 void initMosaicBins (Catalog *catalog, int Ncatalog) { 192 190 193 int i, j;191 off_t i, j; 194 192 195 193 /* measure -> mosaic */ 196 194 if (!MOSAIC_ZEROPT) return; 197 195 198 ALLOCATE (bin, int *, Ncatalog);196 ALLOCATE (bin, off_t *, Ncatalog); 199 197 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)); 201 199 for (j = 0; j < catalog[i].Nmeasure; j++) bin[i][j] = -1; 202 200 } 203 201 204 202 /* 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); 209 207 210 208 for (i = 0; i < Nmosaic; i++) { 211 209 Nlist[i] = 0; 212 210 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]); 215 213 } 216 214 } … … 218 216 void freeMosaicBins (int Ncatalog) { 219 217 220 int i;218 off_t i; 221 219 222 220 /* measure -> mosaic */ … … 241 239 int findMosaics (Catalog *catalog, int Ncatalog) { 242 240 243 int i, j, ecode; 241 off_t j; 242 int i, ecode; 244 243 245 244 if (!MOSAIC_ZEROPT) return (FALSE); … … 259 258 } 260 259 261 void matchMosaics (Catalog *catalog, int meas, int cat) {262 263 int i;260 void matchMosaics (Catalog *catalog, off_t meas, int cat) { 261 262 int off_t; 264 263 265 264 for (i = 0; i < Nmosaic; i++) { … … 296 295 } 297 296 298 float getMmos ( int meas, int cat) {299 300 int i;297 float getMmos (off_t meas, off_t cat) { 298 299 off_t i; 301 300 float value; 302 301 … … 313 312 int setMmos (Catalog *catalog, int PoorImages) { 314 313 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; 316 316 float Msys, Mrel, Mcal, Mgrid; 317 317 double *list, *dlist, *Mlist, *dMlist; … … 422 422 StatType statsMosaicM (Catalog *catalog) { 423 423 424 int i, n; 424 off_t i; 425 int n; 425 426 double *list, *dlist; 426 427 StatType stats; … … 448 449 StatType statsMosaicdM (Catalog *catalog) { 449 450 450 int i, n;451 off_t i, n; 451 452 double *list, *dlist; 452 453 StatType stats; … … 476 477 StatType statsMosaicN (Catalog *catalog) { 477 478 478 int i, j, m, c, n, N;479 off_t i, j, m, c, n, N; 479 480 double *list, *dlist; 480 481 float Mcal, Mgrid, Mrel; … … 520 521 StatType statsMosaicX (Catalog *catalog) { 521 522 522 int i, n;523 off_t i, n; 523 524 double *list, *dlist; 524 525 StatType stats; … … 549 550 void clean_mosaics () { 550 551 551 int i, N, mark, Nmark;552 off_t i, N, mark, Nmark; 552 553 double *mlist, *slist, *dlist; 553 554 double MaxOffset, MedOffset, MaxScatter; … … 599 600 void plot_mosaic_fields (Catalog *catalog) { 600 601 601 int i, j, m, c, N, ave, Nimage;602 off_t i, j, m, c, N, ave, Nimage; 602 603 double *xlist, *ylist; 603 604 double Xmin, Xmax, Ymin, Ymax; … … 645 646 void plot_mosaics () { 646 647 647 int i, bin;648 off_t i, bin; 648 649 double *xlist, *Mlist, *dlist; 649 650 Graphdata graphdata; … … 694 695 } 695 696 696 int *SelectRefMosaic (Mosaic **refmosaic, int *Nimage) {697 698 int i, Imax, Nmax;697 off_t *SelectRefMosaic (Mosaic **refmosaic, off_t *Nimage) { 698 699 off_t i, Imax, Nmax; 699 700 700 701 Imax = 0; -
branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/bcatalog.c
r27305 r27306 114 114 115 115 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, 117 117 (long long) subcatalog[0].Naverage, (long long) subcatalog[0].Nmeasure); 118 118 } -
branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/load_images.c
r27295 r27306 4 4 5 5 Image *image, *subset; 6 intNimage, Nsubset, Nchar;7 int*LineNumber;6 off_t Nimage, Nsubset, Nchar; 7 off_t *LineNumber; 8 8 9 9 SkyTable *sky = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
