- Timestamp:
- May 3, 2010, 8:45:22 AM (16 years ago)
- Location:
- branches/simmosaic_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simmosaic_branches
- Property svn:mergeinfo changed
-
branches/simmosaic_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simmosaic_branches/Ohana/src/relphot/src/GridOps.c
r21508 r27839 7 7 }; 8 8 9 static int Ngrid; 9 static int Ngrid; // number of grid elements (gridX * gridY) 10 10 static float *gridM; // magnitude offset for this grid cell 11 11 static float *gridS; // stdev of the magnitude offset for this grid cell 12 12 static int *gridN; // number of stars used to measure the magnitude offset for this grid cell 13 13 static int *gridV; // data mode for this cell: fitted, frozen, reference 14 static int gridX; 15 static int gridY; 16 17 static int **bin; 18 static int **Xmeas; 19 static int **Ymeas; 14 static int gridX; // number of grid elements in X direction 15 static int gridY; // number of grid elements in Y direction 16 17 static int **bin; // link from catalog, measure to grid element 18 static int **Xmeas; // grid x-coordinate for a measurement 19 static int **Ymeas; // grid y-coordinate for a measurement 20 20 21 21 static int **clist; // link from measurement on a cell to catalog containing measurement 22 static int**mlist; // link from measurement on a cell to measurement in a catalog23 static int *Nlist; // listof measurements for each grid cell24 static int *NLIST;22 static off_t **mlist; // link from measurement on a cell to measurement in a catalog 23 static off_t *Nlist; // number of measurements for each grid cell 24 static off_t *NLIST; // allocated number of measurements for each grid cell 25 25 26 26 static struct { … … 159 159 ALLOCATE (Ymeas, int *, Ncatalog); 160 160 for (i = 0; i < Ncatalog; i++) { 161 ALLOCATE (bin[i], int, MAX (catalog[i].Nmeasure, 1));161 ALLOCATE (bin[i], int, MAX (catalog[i].Nmeasure, 1)); 162 162 ALLOCATE (Xmeas[i], int, MAX (catalog[i].Nmeasure, 1)); 163 163 ALLOCATE (Ymeas[i], int, MAX (catalog[i].Nmeasure, 1)); … … 166 166 167 167 /* define grid -> cat,meas pointers */ 168 ALLOCATE (Nlist, int,Ngrid);169 ALLOCATE (NLIST, int,Ngrid);170 ALLOCATE (clist, int *, Ngrid);171 ALLOCATE (mlist, int *, Ngrid);168 ALLOCATE (Nlist, off_t, Ngrid); 169 ALLOCATE (NLIST, off_t, Ngrid); 170 ALLOCATE (clist, int *, Ngrid); 171 ALLOCATE (mlist, off_t *, Ngrid); 172 172 173 173 for (i = 0; i < Ngrid; i++) { 174 174 Nlist[i] = 0; 175 175 NLIST[i] = 100; 176 ALLOCATE (clist[i], int, NLIST[i]);177 ALLOCATE (mlist[i], int, NLIST[i]);176 ALLOCATE (clist[i], int, NLIST[i]); 177 ALLOCATE (mlist[i], off_t, NLIST[i]); 178 178 } 179 179 } … … 206 206 } 207 207 208 int setGridMeasure ( int meas, int cat, double X, double Y, int ccdnum) {208 int setGridMeasure (off_t meas, int cat, double X, double Y, int ccdnum) { 209 209 210 210 int ix, iy, Cx, Cy, i; … … 241 241 if (Nlist[i] == NLIST[i]) { 242 242 NLIST[i] += 100; 243 REALLOCATE (clist[i], int, NLIST[i]);244 REALLOCATE (mlist[i], int, NLIST[i]);243 REALLOCATE (clist[i], int, NLIST[i]); 244 REALLOCATE (mlist[i], off_t, NLIST[i]); 245 245 } 246 246 return (TRUE); … … 264 264 } 265 265 266 float getMgrid ( int meas, int cat) {266 float getMgrid (off_t meas, int cat) { 267 267 268 268 int i; … … 287 287 288 288 int **gotstar, **gridmeas; 289 int i, j, k, N , Ngood, Nbad, Nmos, Ncal, Nrel, Nsys;289 int i, j, k, Ngood, Nbad, Nmos, Ncal, Nrel, Nsys; 290 290 double **A, **B, *Mjx, *Wjx; 291 291 float Msys, Mcal, Mmos, Merr, Wsys; … … 498 498 gridM[i] = B[i][0]; 499 499 gridS[i] = sqrt(A[i][i]); 500 gridN[i] = N ;500 gridN[i] = Ngood; 501 501 } 502 502 … … 673 673 void dump_grid () { 674 674 675 int i, j, Nimage, Nbytes, Nformat; 676 int *imlist; 675 off_t i, Nimage; 676 int j, Nbytes, Nformat; 677 off_t *imlist; 677 678 FILE *f; 678 679 Header header, theader; … … 702 703 gfits_create_header (&header); 703 704 gfits_create_matrix (&header, &matrix); 704 gfits_modify (&header, "NEXTEND", "% d", 1,Nimage + 3);705 gfits_modify (&header, "NEXTEND", "%lld", 1, (long long) Nimage + 3); 705 706 gfits_modify (&header, "FILTER", "%s", 1, photcode[0].name); 706 gfits_modify (&header, "COMMENT", "%S", 1, "Mosaic Photometry Grid Analysis");707 gfits_modify_alt (&header, "COMMENT", "%S", 1, "Mosaic Photometry Grid Analysis"); 707 708 708 709 // we need to add lines to the PHU to identify the camera and format; these are used by the ipp config system
Note:
See TracChangeset
for help on using the changeset viewer.
