Changeset 19897
- Timestamp:
- Oct 4, 2008, 6:13:08 AM (18 years ago)
- Location:
- trunk/Ohana/src/relphot
- Files:
-
- 6 edited
-
doc/notes.txt (modified) (1 diff)
-
include/relphot.h (modified) (1 diff)
-
src/ConfigInit.c (modified) (1 diff)
-
src/ImageOps.c (modified) (1 diff)
-
src/MosaicOps.c (modified) (14 diffs)
-
src/args.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/doc/notes.txt
r9633 r19897 1 2 2008.09.20 3 4 I am working on the flat-field correction analysis. This is 5 currently triggered by the -grid flag. This analysis needs to 6 require a single camera. 7 8 * need to define the relationship between image and ccdnum 9 (currently it uses as regex, effectively, to match the ccdnum to 10 the number portion of the photcode). make an explicit entry in 11 the dvo.config table. 12 13 * clean up the output files (make the output files have names 14 supplied by the user, etc) 15 16 * I use the string MOSAICNAME to determine the relationship between 17 chips. this allows me to do the relphot grid process on mosaic 18 images for which I don't have bilevel astrometry, but where we do, 19 we could link the mosaic together via the mosaic reference image. 20 Maybe this is a future upgrade. 21 22 * I think mosaic name can be replaced with camera name: we need to 23 supply CAMERA in any case, and the photcodes have names of the 24 form CAMERA.XXX. This is all very ad hoc, but can be effective 25 for the near term. 1 26 2 27 2006.10.17 -
trunk/Ohana/src/relphot/include/relphot.h
r17419 r19897 60 60 61 61 int VERBOSE; 62 int MOSAIC_ZEROPT; 62 63 63 64 int NLOOP; -
trunk/Ohana/src/relphot/src/ConfigInit.c
r12332 r19897 50 50 GetConfig (config, "RELPHOT_GRID_BINNING", "%d", 0, &RELPHOT_GRID_BINNING); 51 51 GetConfig (config, "CAMERA_CONFIG", "%s", 0, CameraConfig); 52 GetConfig (config, "MOSAICNAME", "%s", 0, MOSAICNAME); 52 53 53 54 if (*CATMODE == 0) strcpy (CATMODE, "RAW"); -
trunk/Ohana/src/relphot/src/ImageOps.c
r17201 r19897 67 67 free (mlist); 68 68 } 69 70 /* **** use this to mimic the Mosaic version ***/ 71 # if (0) 72 void initImageGrid (Image *image, int Nimage) { 73 74 /* find max dR, dD range for all mosaics */ 75 /* define mosaic.coords to cover dR, dD */ 76 /* send results to initGridBins */ 77 78 int i, j, m, NX, NY; 79 int dXmax, dYmax; 80 double dS, dX, dY; 81 double R, D, Rmin, Rmax, Dmin, Dmax; 82 double Mcal, dMcal, Xm; 83 84 dXmax = dYmax = 0.0; 85 for (i = 0; i < Nmosaic; i++) { 86 Dmin = Rmin = 360.0; 87 Dmax = Rmax = -360.0; 88 dS = 0.0; 89 Mcal = dMcal = Xm = 0; 90 for (j = 0; j < Nimlist[i]; j++) { 91 m = imlist[i][j]; 92 NX = image[m].NX; 93 NY = image[m].NY; 94 dS += hypot (image[m].coords.cdelt1*image[m].coords.pc1_1, image[m].coords.cdelt1*image[m].coords.pc2_1); 95 XY_to_RD (&R, &D, 0.0, 0.0, &image[m].coords); 96 Rmin = MIN (Rmin, R); 97 Rmax = MAX (Rmax, R); 98 Dmin = MIN (Dmin, D); 99 Dmax = MAX (Dmax, D); 100 XY_to_RD (&R, &D, (double) NX, 0.0, &image[m].coords); 101 Rmin = MIN (Rmin, R); 102 Rmax = MAX (Rmax, R); 103 Dmin = MIN (Dmin, D); 104 Dmax = MAX (Dmax, D); 105 XY_to_RD (&R, &D, (double) NX, (double) NY, &image[m].coords); 106 Rmin = MIN (Rmin, R); 107 Rmax = MAX (Rmax, R); 108 Dmin = MIN (Dmin, D); 109 Dmax = MAX (Dmax, D); 110 XY_to_RD (&R, &D, 0.0, (double) NY, &image[m].coords); 111 Rmin = MIN (Rmin, R); 112 Rmax = MAX (Rmax, R); 113 Dmin = MIN (Dmin, D); 114 Dmax = MAX (Dmax, D); 115 Mcal += image[m].Mcal; 116 dMcal += image[m].dMcal; 117 Xm += image[m].Xm; 118 /* we are using mosaic.Mcal, not image.Mcal. reset image.Mcal */ 119 image[m].Mcal = 0.0; 120 image[m].dMcal = NAN; 121 image[m].Xm = NAN_S_SHORT; 122 } 123 dS /= Nimlist[i]; 124 strcpy (mosaic[i].coords.ctype, "RA---TAN"); 125 mosaic[i].coords.crval1 = Rmin; 126 mosaic[i].coords.crval2 = Dmin; 127 mosaic[i].coords.crpix1 = 0.0; 128 mosaic[i].coords.crpix2 = 0.0; 129 mosaic[i].coords.cdelt1 = dS; 130 mosaic[i].coords.cdelt2 = dS; 131 mosaic[i].coords.pc1_1 = 1.0; 132 mosaic[i].coords.pc2_2 = 1.0; 133 mosaic[i].coords.pc1_2 = 0.0; 134 mosaic[i].coords.pc2_1 = 0.0; 135 RD_to_XY (&dX, &dY, Rmax, Dmax, &mosaic[i].coords); 136 137 mosaic[i].Mcal = Mcal / Nimlist[i]; 138 mosaic[i].dMcal = dMcal / Nimlist[i]; 139 mosaic[i].Xm = Xm / Nimlist[i]; 140 } 141 if (!USE_GRID) return; 142 143 dXmax = MAX (dXmax, dX); 144 dYmax = MAX (dYmax, dY); 145 initGrid (dXmax, dYmax); 146 return; 147 } 148 # endif 69 149 70 150 /* select all image equivalent to the current photcode */ -
trunk/Ohana/src/relphot/src/MosaicOps.c
r17201 r19897 22 22 char *pname; 23 23 24 if (!MOSAIC NAME[0]) return;24 if (!MOSAIC_ZEROPT) return; 25 25 26 26 Nmosaic = 0; … … 173 173 Image *image; 174 174 175 if (!MOSAIC NAME[0]) return;175 if (!MOSAIC_ZEROPT) return; 176 176 177 177 image = getimages (&Nimage); … … 194 194 195 195 /* measure -> mosaic */ 196 if (!MOSAICNAME[0]) return; 196 if (!MOSAIC_ZEROPT) return; 197 197 198 ALLOCATE (bin, int *, Ncatalog); 198 199 for (i = 0; i < Ncatalog; i++) { … … 220 221 221 222 /* measure -> mosaic */ 222 if (!MOSAICNAME[0]) return; 223 if (!MOSAIC_ZEROPT) return; 224 223 225 for (i = 0; i < Ncatalog; i++) { 224 226 free (bin[i]); … … 241 243 int i, j, ecode; 242 244 243 if (!MOSAICNAME[0]) return (FALSE); 245 if (!MOSAIC_ZEROPT) return (FALSE); 246 244 247 for (i = 0; i < Ncatalog; i++) { 245 248 for (j = 0; j < catalog[i].Nmeasure; j++) { … … 298 301 float value; 299 302 300 if (!MOSAICNAME[0]) return (0); 303 if (!MOSAIC_ZEROPT) return (0); 304 301 305 i = bin[cat][meas]; 302 306 if (i == -1) return (NAN); … … 315 319 Image *image; 316 320 317 if (!MOSAIC NAME[0]) return (FALSE);321 if (!MOSAIC_ZEROPT) return (FALSE); 318 322 319 323 image = getimages (&N); … … 401 405 402 406 bzero (&stats, sizeof (StatType)); 403 if (!MOSAIC NAME[0]) return (stats);407 if (!MOSAIC_ZEROPT) return (stats); 404 408 405 409 ALLOCATE (list, double, Nmosaic); … … 427 431 428 432 bzero (&stats, sizeof (StatType)); 429 if (!MOSAIC NAME[0]) return (stats);433 if (!MOSAIC_ZEROPT) return (stats); 430 434 431 435 ALLOCATE (list, double, Nmosaic); … … 455 459 456 460 bzero (&stats, sizeof (StatType)); 457 if (!MOSAIC NAME[0]) return (stats);461 if (!MOSAIC_ZEROPT) return (stats); 458 462 459 463 ALLOCATE (list, double, Nmosaic); … … 497 501 498 502 bzero (&stats, sizeof (StatType)); 499 if (!MOSAIC NAME[0]) return (stats);503 if (!MOSAIC_ZEROPT) return (stats); 500 504 501 505 ALLOCATE (list, double, Nmosaic); … … 525 529 StatType stats; 526 530 527 if (!MOSAIC NAME[0]) return;531 if (!MOSAIC_ZEROPT) return; 528 532 529 533 if (VERBOSE) fprintf (stderr, "marking poor mosaics\n"); … … 576 580 Graphdata graphdata; 577 581 578 if (!MOSAIC NAME[0]) return;582 if (!MOSAIC_ZEROPT) return; 579 583 580 584 image = getimages (&Nimage); … … 619 623 Graphdata graphdata; 620 624 621 if (!MOSAIC NAME[0]) return;625 if (!MOSAIC_ZEROPT) return; 622 626 623 627 ALLOCATE (xlist, double, Nmosaic); -
trunk/Ohana/src/relphot/src/args.c
r17242 r19897 117 117 } 118 118 119 /* group images by mosaic, find Mmos */ 120 MOSAICNAME[0] = 0; 119 /* XXX this argument used to do two things: specify the camera name and tell the analysis to 120 calculate a common zero point for a single mosaic. I've moved the MOSAICNAME concept into the 121 config system, but need to use this argument to specify that the mosaic zeropoints should be 122 calculated. */ 123 MOSAIC_ZEROPT = FALSE; 121 124 if ((N = get_argument (argc, argv, "-mosaic"))) { 122 125 remove_argument (N, &argc, argv); 123 strcpy (MOSAICNAME, argv[N]); 124 remove_argument (N, &argc, argv); 126 MOSAIC_ZEROPT = TRUE; 125 127 } 126 128 … … 135 137 remove_argument (N, &argc, argv); 136 138 USE_GRID = TRUE; 137 if (!MOSAICNAME[0]) {138 fprintf (stderr, "-grid is only valid with -mosaic\n");139 exit (2);140 }141 139 } 142 140
Note:
See TracChangeset
for help on using the changeset viewer.
