Changeset 41604
- Timestamp:
- May 21, 2021, 11:11:57 AM (5 years ago)
- Location:
- branches/eam_branches/relphot.20210521
- Files:
-
- 1 added
- 3 deleted
- 6 edited
-
Makefile (modified) (4 diffs)
-
include/relphot.h (modified) (2 diffs)
-
src/ImageOps.c (modified) (1 diff)
-
src/RepairWarpMeasures.c (deleted)
-
src/StackImageMaps.c (deleted)
-
src/WarpImageMaps.c (deleted)
-
src/relphot.c (modified) (2 diffs)
-
src/relphot_images.c (modified) (1 diff)
-
src/relphot_objects.c (modified) (5 diffs)
-
test/relphot.grid.dvo (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/relphot.20210521/Makefile
r41603 r41604 29 29 $(SRC)/StatDataSetOps.$(ARCH).o \ 30 30 $(SRC)/ConfigInit.$(ARCH).o \ 31 $(SRC)/GridOps New.$(ARCH).o \31 $(SRC)/GridOps.$(ARCH).o \ 32 32 $(SRC)/ImageOps.$(ARCH).o \ 33 33 $(SRC)/ImageSubset.$(ARCH).o \ … … 39 39 $(SRC)/Shutdown.$(ARCH).o \ 40 40 $(SRC)/StarOps.$(ARCH).o \ 41 $(SRC)/WarpImageMaps.$(ARCH).o \42 $(SRC)/StackImageMaps.$(ARCH).o \43 $(SRC)/RepairWarpMeasures.$(ARCH).o \44 $(SRC)/myIndex.$(ARCH).o \45 41 $(SRC)/psps_ids.$(ARCH).o \ 46 42 $(SRC)/args.$(ARCH).o \ … … 92 88 $(SRC)/StatDataSetOps.$(ARCH).o \ 93 89 $(SRC)/ConfigInit.$(ARCH).o \ 94 $(SRC)/GridOps New.$(ARCH).o \90 $(SRC)/GridOps.$(ARCH).o \ 95 91 $(SRC)/ImageOps.$(ARCH).o \ 96 92 $(SRC)/ImageSubset.$(ARCH).o \ … … 102 98 $(SRC)/Shutdown.$(ARCH).o \ 103 99 $(SRC)/StarOps.$(ARCH).o \ 104 $(SRC)/WarpImageMaps.$(ARCH).o \105 $(SRC)/StackImageMaps.$(ARCH).o \106 $(SRC)/RepairWarpMeasures.$(ARCH).o \107 $(SRC)/myIndex.$(ARCH).o \108 100 $(SRC)/psps_ids.$(ARCH).o \ 109 101 $(SRC)/bcatalog.$(ARCH).o \ -
branches/eam_branches/relphot.20210521/include/relphot.h
r41603 r41604 49 49 50 50 typedef enum { 51 MODE_NONE = 0,52 MODE_LOAD = 1,53 MODE_UPDATE = 2,51 MODE_NONE = 0, 52 MODE_LOAD = 1, 53 MODE_UPDATE = 2, 54 54 MODE_UPDATE_OBJECTS = 3, 55 MODE_SYNTH_PHOT = 4,55 MODE_SYNTH_PHOT = 4, 56 56 } ModeType; 57 57 … … 814 814 void free_astrom_table (); 815 815 816 int RepairWarpMeasures (Catalog *catalog);817 818 int FindWarpGroups (void);819 int GetWarpSeq (Image *image, int obstime, unsigned short photcode, double Rave, double Dave, float X, float Y);820 void FreeWarpGroups (void);821 822 myIndexType *myIndexInit ();823 int myIndexFree (myIndexType *myIndex);824 int myIndexUpdateLimits (myIndexType *myIndex, int value);825 int myIndexSetRange (myIndexType *myIndex);826 int myIndexSetEntry (myIndexType *myIndex, int value, int entry);827 int myIndexGetEntry (myIndexType *myIndex, int value);828 829 816 uint64_t CreatePSPSObjectID(double ra, double dec); 830 817 uint64_t CreatePSPSStackDetectionID(int sourceID, int imageID, int detID); 831 818 uint64_t CreatePSPSDetectionID(double tobs, int ccdid, int detID); 832 819 833 int MakeStackIndex (void);834 void FreeStackGroups (void);835 int GetStackSeq (Image *image, double Rstk, double Dstk, unsigned short photcode, float X, float Y);836 820 void sort_by_ra (double *R, double *D, int *I, int *S, int N); 837 838 void RepairWarpMeasuresOpenLogfile ();839 void RepairWarpMeasuresCloseLogfile ();840 821 841 822 void dump_tgroups (Catalog *catalog, int Npass); -
branches/eam_branches/relphot.20210521/src/ImageOps.c
r41603 r41604 507 507 offset = 0.0; 508 508 } 509 510 // to do this, I need to pass in the catalog and flatcorr pointers511 // int flat_id = image[i].photom_map_id;512 // if (flat_id) {513 // offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[cat].measureT[meas].Xccd, catalog[cat].measureT[meas].Yccd);514 // }515 516 509 return (offset); 517 510 } -
branches/eam_branches/relphot.20210521/src/relphot.c
r39481 r41604 34 34 switch (mode) { 35 35 case UPDATE_IMAGES: 36 // calculate zero points for images (may group my exposure [mosaic], night [tgroups]; may measure flat-correction) 36 37 // IF CALLED WITH NLOOP == 0, DOES NOT LOAD bcatalog, just loads image table and generates ImageSubset.dat 38 // If called with -update, calls reload_catalogs() just like apply_offsets 37 39 relphot_images (skylist); 38 40 relphot_free (sky, skylist); … … 52 54 53 55 case PARALLEL_REGIONS: 54 // run image updates in parallel across multiple remote machines 56 // calculate zero points for images (may group my exposure [mosaic], night [tgroups]; may measure flat-correction) 57 // equivalent to relphot_images, but run in parallel across multiple remote machines 55 58 relphot_parallel_regions (sky); 56 59 relphot_free (sky, skylist); -
branches/eam_branches/relphot.20210521/src/relphot_images.c
r41603 r41604 45 45 if (!UPDATE) dvo_image_unlock (&db); 46 46 47 // load the flat correction table (if defined) 48 // we no longer need to do this: the flatcorrection is now saved in measure.Mflat 49 # if (0) 50 char flatcorrfile[256]; 51 sprintf (flatcorrfile, "%s/flatcorr.fits", CATDIR); 52 FlatCorrectionTable *flatcorr = FlatCorrectionLoad (flatcorrfile, VERBOSE); 53 # endif 54 FlatCorrectionTable *flatcorr = NULL; 47 FlatCorrectionTable *flatcorr = NULL; // no longer used here 55 48 56 49 initGridBins (); // allocates the empty array of corrections (elements are build below) -
branches/eam_branches/relphot.20210521/src/relphot_objects.c
r41603 r41604 43 43 // load the ZP corrections here 44 44 if (SYNTH_ZERO_POINTS) SynthZeroPointsLoad (SYNTH_ZERO_POINTS); 45 46 if (REPAIR_WARPS) {47 FindWarpGroups ();48 MARKTIME("setup warp groups: %f sec\n", dtime);49 MakeStackIndex ();50 MARKTIME("setup stack index: %f sec\n", dtime);51 RepairWarpMeasuresOpenLogfile ();52 }53 45 54 46 // load data from each region file, only use bright stars … … 128 120 findMosaics (&catalog, 1, FALSE); 129 121 130 // update the detection coordinates using the new image parameters131 if (REPAIR_WARPS) RepairWarpMeasures (&catalog);132 133 122 initMrel (&catalog, 1); 134 123 setMrelFinal (&catalog, NULL, TRUE); … … 153 142 if (VERBOSE) fprintf (stderr, "saving catalog %s\n", catalog.filename); 154 143 155 char history[128];156 144 struct timeval now; 157 145 gettimeofday (&now, (void *) NULL); 158 146 char *moddate = ohana_sec_to_date (now.tv_sec); 159 147 gfits_modify (&catalog.header, "RELPHOT", "%s", 1, moddate); 160 if (REPAIR_WARPS) {161 snprintf (history, 128, "repair warp measure.imageID: %s", moddate);162 gfits_modify_alt (&catalog.header, "HISTORY", "%S", 0, history); // adds a new entry163 }164 148 free (moddate); 165 149 … … 184 168 freeMosaicBins (1, FALSE); 185 169 freeGridBins (); 186 }187 188 if (REPAIR_WARPS) {189 FreeWarpGroups ();190 FreeStackGroups ();191 RepairWarpMeasuresCloseLogfile ();192 170 } 193 171 … … 252 230 if (RESET) { strextend (&command, "-reset"); } 253 231 if (RESET_ZEROPTS) { strextend (&command, "-reset-zpts"); } 254 if (REPAIR_WARPS) { strextend (&command, "-repair-warps"); }255 232 if (PRESERVE_PS1) { strextend (&command, "-preserve-ps1"); } 256 233 if (IS_DIFF_DB) { strextend (&command, "-is-diff-db"); }
Note:
See TracChangeset
for help on using the changeset viewer.
