Changeset 41620
- Timestamp:
- May 27, 2021, 11:41:52 AM (5 years ago)
- Location:
- branches/eam_branches/relphot.20210521
- Files:
-
- 1 added
- 14 edited
-
Makefile (modified) (2 diffs)
-
include/relphot.h (modified) (6 diffs)
-
src/GridOps.c (modified) (2 diffs)
-
src/ResetOps.c (added)
-
src/args.c (modified) (2 diffs)
-
src/bcatalog.c (modified) (4 diffs)
-
src/launch_region_hosts.c (modified) (1 diff)
-
src/load_catalogs.c (modified) (1 diff)
-
src/load_images.c (modified) (2 diffs)
-
src/reload_catalogs.c (modified) (3 diffs)
-
src/relphot_images.c (modified) (2 diffs)
-
src/relphot_objects.c (modified) (5 diffs)
-
src/select_images.c (modified) (1 diff)
-
src/setMrelCatalog.c (modified) (2 diffs)
-
src/setMrelFinal.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/relphot.20210521/Makefile
r41612 r41620 31 31 $(SRC)/GridOps.$(ARCH).o \ 32 32 $(SRC)/GridIO.$(ARCH).o \ 33 $(SRC)/ResetOps.$(ARCH).o \ 33 34 $(SRC)/ImageOps.$(ARCH).o \ 34 35 $(SRC)/ImageSubset.$(ARCH).o \ … … 91 92 $(SRC)/GridOps.$(ARCH).o \ 92 93 $(SRC)/GridIO.$(ARCH).o \ 94 $(SRC)/ResetOps.$(ARCH).o \ 93 95 $(SRC)/ImageOps.$(ARCH).o \ 94 96 $(SRC)/ImageSubset.$(ARCH).o \ -
branches/eam_branches/relphot.20210521/include/relphot.h
r41615 r41620 442 442 int RESET; 443 443 int RESET_ZEROPTS; 444 int RESET_FLATCORR; 444 445 int REPAIR_WARPS; 445 446 int PRESERVE_PS1; … … 578 579 ImageSubset *getimages_subset PROTO((off_t *N)); 579 580 void global_stats PROTO((Catalog *catalog, int Ncatalog, int nloop)); 580 void initGrid PROTO(( ));581 void initGrid PROTO((void)); 581 582 void setMflatFromGrid PROTO((Catalog *catalog)); 582 void initGridBins PROTO(( ));583 void initGridBins PROTO((void)); 583 584 GridCorrectionType *getGridCorrByCode PROTO((int code)); 584 585 GridCorrectionType *getGridCorrNext PROTO((int *Nlast)); … … 749 750 StatDataSet *StatDataSetAlloc (int Nsecfilt, int Nmax); 750 751 751 int init_synthetic_mags ( );752 int init_synthetic_mags (void); 752 753 int add_synthetic_mags (AverageTiny *average, SecFilt *secfilt, MeasureTiny *measure, off_t *Nmeasure, off_t *Nm); 753 754 … … 810 811 811 812 int SynthZeroPointsLoad (char *filename); 812 SynthZeroPoints *SynthZeroPointsGet ( );813 SynthZeroPoints *SynthZeroPointsGet (void); 813 814 814 815 int relphot_synthphot (SkyList *sky, int hostID, char *hostpath); … … 829 830 830 831 void put_astrom_table (AstromOffsetTable *myTable); 831 void free_astrom_table ( );832 void free_astrom_table (void); 832 833 833 834 uint64_t CreatePSPSObjectID(double ra, double dec); … … 852 853 853 854 int MagResidSave(char *filename, Catalog *catalog); 855 856 void ResetAverageAndMeasure (Catalog *catalog); 857 void ResetAverageObjects (Catalog *catalog); 858 void ResetImages (Image *subset, off_t Nsubset); 859 void ResetMeasureZeroPoints (MeasureTiny *measure, off_t Nmeasure, off_t Ncat); 860 void ResetAverageActivePhotcodes (SecFilt *secfilt); 861 862 -
branches/eam_branches/relphot.20210521/src/GridOps.c
r41615 r41620 29 29 # define NY_BIN 2 30 30 31 void initGridBins ( ) {31 void initGridBins (void) { 32 32 33 33 // allocate the full possible range of GridCorrectionType pointers, Nphotcode … … 116 116 /* for GPC1, we have 60 chips, 5 filters, 16x16 grid cells = 2MB of memory for this stuff 117 117 if we go to 64x64 grid cells (~75 pixels), then it is still only 29MB */ 118 void initGrid ( ) {118 void initGrid (void) { 119 119 120 120 if (!GRID_ZEROPT) return; -
branches/eam_branches/relphot.20210521/src/args.c
r41615 r41620 220 220 RESET = TRUE; 221 221 } 222 223 222 RESET_ZEROPTS = FALSE; 224 223 if ((N = get_argument (argc, argv, "-reset-zpts"))) { 225 224 remove_argument (N, &argc, argv); 226 225 RESET_ZEROPTS = TRUE; 226 } 227 RESET_FLATCORR = FALSE; 228 if ((N = get_argument (argc, argv, "-reset-flat"))) { 229 remove_argument (N, &argc, argv); 230 RESET_FLATCORR = TRUE; 227 231 } 228 232 … … 759 763 RESET = TRUE; 760 764 } 761 762 765 RESET_ZEROPTS = FALSE; 763 766 if ((N = get_argument (argc, argv, "-reset-zpts"))) { 764 767 remove_argument (N, &argc, argv); 765 768 RESET_ZEROPTS = TRUE; 769 } 770 RESET_FLATCORR = FALSE; 771 if ((N = get_argument (argc, argv, "-reset-flat"))) { 772 remove_argument (N, &argc, argv); 773 RESET_FLATCORR = TRUE; 766 774 } 767 775 -
branches/eam_branches/relphot.20210521/src/bcatalog.c
r41603 r41620 35 35 ALLOCATE (Nvalid, int, Nsecfilt); 36 36 37 // flags used by the photometry analysis (excluding UBERCAL)38 unsigned int PHOTOM_FLAGS =39 ID_MEAS_NOCAL | // detection ignored for this analysis (photcode, time range)40 ID_MEAS_POOR_PHOTOM | // detection is photometry outlier41 ID_MEAS_SKIP_PHOTOM | // detection was ignored for photometry measurement42 ID_MEAS_AREA | // detetion was outside acceptable area of device43 ID_MEAS_SYNTH_MAG | // magnitude is synthetic44 ID_MEAS_STACK_PRIMARY | // this stack measurement is in the primary skycell45 ID_MEAS_STACK_PHOT_SRC | // this measurement supplied the stack photometry46 ID_MEAS_PHOTOM_PSF | // this measurement is used for the mean psf mag47 ID_MEAS_PHOTOM_APER | // this measurement is used for the mean ap mag48 ID_MEAS_PHOTOM_KRON ; // this measurement is used for the mean kron mag49 50 37 /* exclude stars not in range or with too few measurements */ 51 38 for (i = 0; i < catalog[0].Naverage; i++) { … … 61 48 } 62 49 63 // reset the calculated average magnitudes (does not affect ubercal-tied measurements or images) 64 if (RESET) { 65 int Ns; 66 67 for (Ns = 0; Ns < Nphotcodes; Ns++) { 68 69 int thisCode = photcodes[Ns][0].code; 70 int Nsec = GetPhotcodeNsec(thisCode); 71 72 dvo_secfilt_init (&subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec], SECFILT_RESET_ALL); 73 } 74 } 50 // reset the calculated average magnitudes for active photcode only 51 ResetAverageActivePhotcodes (&subcatalog[0].secfilt[Nsecfilt*Naverage]); 75 52 76 53 Nm = 0; … … 111 88 if (isnan(catalog[0].measure[offset].Mkron)) { Nnan ++; continue; } 112 89 113 // require 0x01 in photFlags (fitted with a PSF) 90 // require 0x01 in photFlags (fitted with a PSF) -- add to the test data 114 91 // XXX EAM : test is inconsistent -- fix if ((catalog[0].measure[offset].photFlags & 0x01) == 0) { Nbad ++; continue; } 115 92 … … 156 133 subcatalog[0].measureT[Nmeasure].dbFlags &= ~ID_MEAS_SKIP_PHOTOM; 157 134 subcatalog[0].measureT[Nmeasure].averef = Naverage; 158 if (RESET) { 159 // only reset Mcal for measures with a matching image 160 // do not reset Mcal for ubercal images unless explicitly requested 161 if (subcatalog[0].measureT[Nmeasure].dbFlags & ID_MEAS_PHOTOM_UBERCAL) { 162 if (!KEEP_UBERCAL) { 163 subcatalog[0].measureT[Nmeasure].McalPSF = 0.0; 164 subcatalog[0].measureT[Nmeasure].McalAPER = 0.0; 165 subcatalog[0].measureT[Nmeasure].dbFlags &= ~ID_MEAS_PHOTOM_UBERCAL; 166 } 167 } else { 168 if (getImageEntry (Nmeasure, Ncat) >= 0) { 169 subcatalog[0].measureT[Nmeasure].McalPSF = 0.0; 170 subcatalog[0].measureT[Nmeasure].McalAPER = 0.0; 171 } 172 } 173 subcatalog[0].measureT[Nmeasure].dbFlags &= ~PHOTOM_FLAGS; 174 } 135 ResetMeasureZeroPoints (&subcatalog[0].measureT[Nmeasure], Nmeasure, Ncat); 136 175 137 Nmeasure ++; 176 138 Nm ++; -
branches/eam_branches/relphot.20210521/src/launch_region_hosts.c
r40291 r41620 62 62 if (RESET) strextend (&command, "-reset"); 63 63 if (RESET_ZEROPTS) strextend (&command, "-reset-zpts"); 64 if (RESET_FLATCORR) strextend (&command, "-reset-flat"); 64 65 if (!KEEP_UBERCAL) strextend (&command, "-reset-ubercal"); 65 66 if (DophotSelect) strextend (&command, "-dophot %d", DophotValue); -
branches/eam_branches/relphot.20210521/src/load_catalogs.c
r40549 r41620 165 165 if (RESET) { strextend (&command, "-reset"); } 166 166 if (RESET_ZEROPTS) { strextend (&command, "-reset-zpts"); } 167 if (RESET_FLATCORR) { strextend (&command, "-reset-flat"); } 167 168 if (!KEEP_UBERCAL) { strextend (&command, "-reset-ubercal"); } 168 169 if (DophotSelect) { strextend (&command, "-dophot %d", DophotValue); } -
branches/eam_branches/relphot.20210521/src/load_images.c
r41555 r41620 57 57 // reset image values as needed. always allow 'few' images to succeed, if possible (new 58 58 // images / detections may have been added 59 for (off_t i = 0; i < Nsubset; i++) { 60 // reset these two regardless (we will re-determine) 61 subset[i].flags &= ~(ID_IMAGE_PHOTOM_NOCAL | ID_IMAGE_PHOTOM_POOR | ID_IMAGE_PHOTOM_SKIP | ID_IMAGE_PHOTOM_FEW); 62 if (RESET) { 63 if (RESET_ZEROPTS) { 64 if (!KEEP_UBERCAL || !(subset[i].flags & ID_IMAGE_PHOTOM_UBERCAL)) { 65 subset[i].McalPSF = 0.0; 66 subset[i].McalAPER = 0.0; 67 subset[i].dMcal = NAN; 68 subset[i].flags &= ~ID_IMAGE_PHOTOM_UBERCAL; 69 } 70 } 71 subset[i].flags &= ~(ID_IMAGE_MOSAIC_POOR | ID_IMAGE_NIGHT_POOR); 72 subset[i].flags &= ~(ID_IMAGE_IMAGE_PHOTCAL | ID_IMAGE_MOSAIC_PHOTCAL | ID_IMAGE_TGROUP_PHOTCAL); 73 subset[i].ubercalDist = 1000; 74 } 75 } 59 ResetImages (subset, Nsubset); 76 60 77 61 // XXX consider allowing relphot to skip the AstroMap load (do we need precise astrometry here?) … … 115 99 return TRUE; 116 100 } 101 102 // This function re-creates the image subset array using the array of LineNumbers saved 103 // initially by load_images. This function is only called by relphot_images.c after the 104 // loops have been completed (if any). I am not certain this function is doing anything 105 // at all : the values in the image subset are copied back to the master table in 106 // save_images_updates() so the values copied from the master to the subset should already 107 // be there. 117 108 118 109 int reload_images (FITS_DB *db) { -
branches/eam_branches/relphot.20210521/src/reload_catalogs.c
r41615 r41620 90 90 initTGroupBins (&catalog, 1); 91 91 92 initGridBins ( &catalog, 1);92 initGridBins (); 93 93 TIMESTAMP(time3b); 94 94 … … 237 237 char *command = NULL; 238 238 strextend (&command, "relphot_client %s -update-catalogs %s", PhotcodeList, imageFile); 239 strextend (&command, "-hostID %d -D CATDIR %s -hostdir %s", group->hosts[i][0].hostID, CATDIR, group->hosts[i][0].pathname); 239 strextend (&command, "-hostID %d", group->hosts[i][0].hostID); 240 strextend (&command, "-D CATDIR %s", CATDIR); 241 strextend (&command, "-hostdir %s", group->hosts[i][0].pathname); 240 242 strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 241 243 strextend (&command, "-statmode %s", STATMODE); 242 244 strextend (&command, "-D CAMERA %s", CAMERA); 243 strextend (&command, "-D STAR_TOOFEW %d -minerror %f", STAR_TOOFEW, MIN_ERROR); 244 245 // options & configs which affect relphot_client -update-catalogs 246 // VERBOSE, VERBOSE2 247 // RESET 248 // RESET_ZEROPTS 249 // TimeSelect 250 // AreaSelect 251 // STATMODE 252 // STAR_TOOFEW 253 // MIN_ERROR 254 245 strextend (&command, "-D STAR_TOOFEW %d", STAR_TOOFEW); 246 strextend (&command, "-minerror %f", MIN_ERROR); 247 255 248 if (VERBOSE) { strextend (&command, "-v"); } 256 249 if (VERBOSE2) { strextend (&command, "-vv"); } 257 250 if (RESET) { strextend (&command, "-reset"); } 258 251 if (RESET_ZEROPTS) { strextend (&command, "-reset-zpts"); } 252 if (RESET_FLATCORR) { strextend (&command, "-reset-flat"); } 253 if (!KEEP_UBERCAL) { strextend (&command, "-reset-ubercal"); } 259 254 if (PRESERVE_PS1) { strextend (&command, "-preserve-ps1"); } 255 if (IS_DIFF_DB) { strextend (&command, "-is-diff-db"); } 260 256 if (UPDATE) { strextend (&command, "-update"); } 261 if (IS_DIFF_DB) { strextend (&command, "-is-diff-db"); }262 if (!KEEP_UBERCAL) { strextend (&command, "-reset-ubercal"); }263 257 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 264 258 if (BOUNDARY_TREE) { strextend (&command, "-boundary-tree %s", BOUNDARY_TREE); } … … 266 260 if (GRID_ZEROPT) { strextend (&command, "-grid %s", GRID_MEANFILE); } 267 261 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 262 // if (USE_ALL_IMAGES) { strextend (&command, "-use-all-images"); } 268 263 if (USE_MCAL_PSF_FOR_STACK_APER) { strextend (&command, "-use-mcal-psf-for-stack-aper"); } 269 264 -
branches/eam_branches/relphot.20210521/src/relphot_images.c
r41615 r41620 38 38 MARKTIME("-- load image data: %f sec\n", dtime); 39 39 40 /* load regions and images based on specified sky patch and/or catalog */ 40 // load regions and images based on specified sky patch and/or catalog 41 // NOTE: load_images transfers zero points from images to mosaics (initMosaicMcal) 42 // and to tgroups (initTGroupMcal), resetting the image zero points to 0.0. 43 44 // (if both tgroups and mosaics are used, the mosaics will hold the value and tgroups 45 // will get values of 0.0. This is not clearly the right way to go, but may not matter 46 // if we reset everything). 47 41 48 load_images (&db, skylist, &UserPatch, FALSE, USE_ALL_IMAGES); 42 49 MARKTIME("-- load images: %f sec\n", dtime); … … 45 52 if (!UPDATE) dvo_image_unlock (&db); 46 53 47 initGridBins (); // allocates the empty array of corrections (elements are buil dbelow)54 initGridBins (); // allocates the empty array of corrections (elements are built below) 48 55 49 56 if (CALIBRATE_STACKS_AND_WARPS || (NLOOP > 0)) { -
branches/eam_branches/relphot.20210521/src/relphot_objects.c
r41606 r41620 10 10 int relphot_objects (SkyList *skylist, int hostID, char *hostpath) { 11 11 12 off_t i, j, k; 13 int Nsecfilt; 12 off_t i; 14 13 struct stat filestat; 15 14 … … 85 84 86 85 // reset the calculated average magnitudes (does not affect ubercal-tied measurements or images) 87 if (RESET) { 88 Nsecfilt = catalog.Nsecfilt; 89 90 DVOAverageFlags photomBits = 91 ID_OBJ_EXT | // extended in our data (eg, PS) 92 ID_OBJ_EXT_ALT | // extended in external data (eg, 2MASS) 93 ID_OBJ_GOOD | // good-quality measurement in our data (eg,PS) 94 ID_OBJ_GOOD_ALT | // good-quality measurement in external data (eg, 2MASS) 95 ID_OBJ_GOOD_STACK | // good-quality object in the stack (> 1 good stack) 96 ID_OBJ_BEST_STACK | // the primary stack measurement are the best measurements 97 ID_OBJ_SUSPECT_STACK | // suspect object in the stack (> 1 good or suspect stack, < 2 good) 98 ID_OBJ_BAD_STACK; // good-quality object in the stack (> 1 good stack) 99 100 for (j = 0; j < catalog.Naverage; j++) { 101 catalog.average[j].flags &= ~photomBits; // reset all except astrometry bits 102 catalog.average[j].psfQF = NAN; // reset (will be re-calculated here) 103 catalog.average[j].psfQFperf = NAN; // reset (will be re-calculated here) 104 catalog.average[j].stargal = NAN; // reset (will be re-calculated here) 105 catalog.average[j].photFlagsUpper = 0; // reset (will be re-calculated here) 106 catalog.average[j].photFlagsLower = 0; // reset (will be re-calculated here) 107 catalog.average[j].NwarpOK = 0; // reset (will be re-calculated here) 108 for (k = 0; k < Nsecfilt; k++) { 109 dvo_secfilt_init (&catalog.secfilt[j*Nsecfilt + k], SECFILT_RESET_ALL); 110 } 111 } 112 } 86 ResetAverageObjects(&catalog); 113 87 114 88 populate_tiny_values(&catalog, DVO_TV_MEASURE | DVO_TV_AVERAGE); … … 119 93 // XXX reload_catalogs.c calls initTGroupBins here 120 94 121 initGridBins ( &catalog, 1);95 initGridBins (); 122 96 123 97 findImages (&catalog, 1, FALSE); … … 235 209 if (RESET) { strextend (&command, "-reset"); } 236 210 if (RESET_ZEROPTS) { strextend (&command, "-reset-zpts"); } 211 if (RESET_FLATCORR) { strextend (&command, "-reset-flat"); } 212 if (!KEEP_UBERCAL) { strextend (&command, "-reset-ubercal"); } 237 213 if (PRESERVE_PS1) { strextend (&command, "-preserve-ps1"); } 238 214 if (IS_DIFF_DB) { strextend (&command, "-is-diff-db"); } 239 215 if (UPDATE) { strextend (&command, "-update"); } 240 if (!KEEP_UBERCAL) { strextend (&command, "-reset-ubercal"); }241 216 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 242 217 if (BOUNDARY_TREE) { strextend (&command, "-boundary-tree %s", BOUNDARY_TREE); } 243 218 if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); } 219 // if (GRID_ZEROPT) { strextend (&command, "-grid %s", GRID_MEANFILE); } 244 220 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 245 221 if (USE_ALL_IMAGES) { strextend (&command, "-use-all-images"); } … … 251 227 252 228 // if (SET_MREL_VERSION != 1) { strextend (&command, "-set-mrel-version %d", SET_MREL_VERSION); } 229 230 // missing AreaSelect & TimeSelect 253 231 254 232 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/relphot.20210521/src/select_images.c
r41601 r41620 102 102 103 103 if (!(i % 300000)) fprintf (stderr, "."); 104 105 // XXX I am just going for force this for the moment:106 // goto found_it;107 104 108 105 /* exclude images by photcode (we are not doing this, but I'm not sure why) */ -
branches/eam_branches/relphot.20210521/src/setMrelCatalog.c
r41608 r41620 351 351 for (Nsec = 0; Nsec < Nsecfilt; Nsec++) { 352 352 353 // if we detected this object in PS1, or do not request -preserve-ps1, keep the mean photometry values 353 // -preserve-ps1 means keep an existing average PS1 value 354 // if we did not detect this object in PS1, or do not request -preserve-ps1, keep the mean photometry values 354 355 if (!PRESERVE_PS1 || !(secfilt[Nsec].flags & ID_SECF_HAS_PS1)) { 355 356 dvo_secfilt_init (&secfilt[Nsec], SECFILT_RESET_CHIP); // this does not reset astrometry or STACK bits … … 606 607 607 608 // reset all stack-related values for this secfilt: 608 secfilt[Nsec].stackBestOff = -1; 609 secfilt[Nsec].stackPrmryOff = -1; 610 secfilt[Nsec].FpsfStk = NAN; 611 secfilt[Nsec].dFpsfStk = NAN; 612 secfilt[Nsec].FkronStk = NAN; 613 secfilt[Nsec].dFkronStk = NAN; 614 secfilt[Nsec].FapStk = NAN; 615 secfilt[Nsec].dFapStk = NAN; 616 secfilt[Nsec].MpsfStk = NAN; 617 secfilt[Nsec].MkronStk = NAN; 618 secfilt[Nsec].MapStk = NAN; 619 secfilt[Nsec].Nstack = 0; 620 secfilt[Nsec].NstackDet = 0; 621 secfilt[Nsec].flags &= ~ID_SECF_STACK_FLAGS; // reset the stack flags 609 dvo_secfilt_init (&secfilt[Nsec], SECFILT_RESET_STACK); 622 610 623 611 for (off_t k = 0; k < Nmeasure; k++) { -
branches/eam_branches/relphot.20210521/src/setMrelFinal.c
r41608 r41620 11 11 int Nsecfilt = GetPhotcodeNsecfilt (); 12 12 13 /*** RESET photometry flags and Mcal values ***/ 14 if (RESET) { 15 // flags used by the photometry analysis (excluding UBERCAL) 16 unsigned int PHOTOM_FLAGS = 17 ID_MEAS_NOCAL | // detection ignored for this analysis (photcode, time range) 18 ID_MEAS_POOR_PHOTOM | // detection is photometry outlier 19 ID_MEAS_SKIP_PHOTOM | // detection was ignored for photometry measurement 20 ID_MEAS_AREA | // detetion was outside acceptable area of device 21 ID_MEAS_SYNTH_MAG | // magnitude is synthetic 22 ID_MEAS_STACK_PRIMARY | // this stack measurement is in the primary skycell 23 ID_MEAS_STACK_PHOT_SRC; // this measurement supplied the stack photometry 24 25 // ID_MEAS_PHOTOM_UBERCAL -- externally-supplied zero point from ubercal analysis 26 // this is set by 'setphot', do not reset here 27 28 // flags used by the photometry analysis (excluding UBERCAL) 29 // unsigned int secfiltFlags = 30 // ID_PHOTOM_PASS_0 | // average measured at pass 0 31 // ID_PHOTOM_PASS_1 | // average measured at pass 1 32 // ID_PHOTOM_PASS_2 | // average measured at pass 2 33 // ID_PHOTOM_PASS_3 | // average measured at pass 3 34 // ID_PHOTOM_PASS_4 | // average measured at pass 3 35 // ID_SECF_USE_SYNTH | // average measured at pass 3 36 // ID_SECF_USE_UBERCAL | // average measured at pass 3 37 // ID_SECF_OBJ_EXT; // average measured at pass 3 38 39 // XXX I should really deprecate the concept of applying the average 40 // calculation to a limited set of photcodes. 41 // for now, just do all photcodes here ( 42 // as it stands, only stacks are limited by photcode; mean exp and forced warp 43 // are applied to all Nsecfilt 44 45 for (i = 0; i < catalog[0].Naverage; i++) { 46 int Ns; 47 for (Ns = 0; Ns < Nsecfilt; Ns++) { 48 49 off_t N = Nsecfilt*i+Ns; 50 dvo_secfilt_init (&catalog[0].secfilt[N], SECFILT_RESET_ALL); 51 52 off_t m = catalog[0].average[i].measureOffset; 53 off_t j; 54 for (j = 0; j < catalog[0].average[i].Nmeasure; j++, m++) { 55 56 /* select measurements by time */ 57 if (TimeSelect) { 58 if (catalog[0].measure[m].t < TSTART) continue; 59 if (catalog[0].measure[m].t > TSTOP) continue; 60 } 61 62 // only reset Mcal for measures with a matching image 63 // do not reset Mcal for ubercal images unless explicitly requested 64 65 if (catalog[0].measure[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) { 66 if (!KEEP_UBERCAL) { 67 catalog[0].measure[m].McalPSF = 0.0; 68 catalog[0].measure[m].McalAPER = 0.0; 69 catalog[0].measure[m].dbFlags &= ~ID_MEAS_PHOTOM_UBERCAL; 70 } 71 } else { 72 if (RESET_ZEROPTS && (getImageEntry (m, 0) >= 0)) { 73 catalog[0].measure[m].McalPSF = 0.0; 74 catalog[0].measure[m].McalAPER = 0.0; 75 } 76 } 77 catalog[0].measure[m].dbFlags &= ~PHOTOM_FLAGS; 78 } 79 } 80 } 81 } 82 13 ResetAverageAndMeasure (catalog); 14 83 15 // this sets flags in the measureT element, not the measure element 84 16 setExclusions (catalog, 1, VERBOSE); /* mark by area */
Note:
See TracChangeset
for help on using the changeset viewer.
