Changeset 33788 for branches/eam_branches/ipp-20120405/Ohana
- Timestamp:
- Apr 16, 2012, 5:56:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/select_images.c
r33651 r33788 33 33 struct timeval start, stop; 34 34 35 double RmaxSkyRegion, RminSkyRegion, RmidSkyRegion, DminSkyRegion, DmaxSkyRegion;36 37 35 double *RmaxSky; 38 36 off_t *index; … … 59 57 ALLOCATE (index, off_t, skylist[0].Nregions); 60 58 61 RminSkyRegion = +360.0;62 RmaxSkyRegion = -360.0;63 DminSkyRegion = +90.0;64 DmaxSkyRegion = -90.0;59 double RminSkyRegion = +360.0; 60 double RmaxSkyRegion = -360.0; 61 double DminSkyRegion = +90.0; 62 double DmaxSkyRegion = -90.0; 65 63 66 64 D_NIMAGE = 6000; 67 65 68 66 // FILE *ftest = fopen ("relphot.dump.dat", "w"); 67 68 // The regions have RA values in the range 0-360, which implies an RA midpoint of 180. 69 // A patch which covers the 0,360 boundary (but not much more) needs to treat the values 70 // as being centered on 0.0. Run the following test with both and see which yields a 71 // smaller contiguious patch 72 73 double RminSkyRegionAlt = +360.0; 74 double RmaxSkyRegionAlt = -360.0; 69 75 70 76 /* compare with each region file */ … … 100 106 DminSkyRegion = MIN(DminSkyRegion, skylist[0].regions[i][0].Dmin); 101 107 DmaxSkyRegion = MAX(DmaxSkyRegion, skylist[0].regions[i][0].Dmax); 102 } 103 RmidSkyRegion = 0.5*(RminSkyRegion + RmaxSkyRegion); 108 109 double RminAlt = ohana_normalize_angle_to_midpoint (skylist[0].regions[i][0].Rmin, 0.0); 110 double RmaxAlt = ohana_normalize_angle_to_midpoint (skylist[0].regions[i][0].Rmax, 0.0); 111 RminSkyRegionAlt = MIN(RminSkyRegionAlt, RminAlt); 112 RmaxSkyRegionAlt = MAX(RmaxSkyRegionAlt, RmaxAlt); 113 114 RminSkyRegion = MIN(RminSkyRegion, skylist[0].regions[i][0].Rmin); 115 RmaxSkyRegion = MAX(RmaxSkyRegion, skylist[0].regions[i][0].Rmax); 116 DminSkyRegion = MIN(DminSkyRegion, skylist[0].regions[i][0].Dmin); 117 DmaxSkyRegion = MAX(DmaxSkyRegion, skylist[0].regions[i][0].Dmax); 118 } 119 // use the option which gives the smaller RA range 120 if ((RmaxSkyRegionAlt - RminSkyRegionAlt) < (RmaxSkyRegion - RminSkyRegion)) { 121 RminSkyRegion = RminSkyRegionAlt; 122 RmaxSkyRegion = RmaxSkyRegionAlt; 123 } 124 125 double RmidSkyRegion = 0.5*(RminSkyRegion + RmaxSkyRegion); 104 126 MARKTIME("create sky region coords: %f sec\n", dtime); 105 127
Note:
See TracChangeset
for help on using the changeset viewer.
