Changeset 38501
- Timestamp:
- Jun 19, 2015, 3:11:07 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150616/Ohana/src/addstar
- Files:
-
- 14 edited
-
include/addstar.h (modified) (2 diffs)
-
include/loadgalphot.h (modified) (1 diff)
-
src/ConfigInit.c (modified) (2 diffs)
-
src/ImageIndex.c (modified) (9 diffs)
-
src/LoadData.c (modified) (1 diff)
-
src/LoadHeaders.c (modified) (1 diff)
-
src/LoadStars.c (modified) (7 diffs)
-
src/MatchHeaders.c (modified) (5 diffs)
-
src/ReadStarsFITS.c (modified) (1 diff)
-
src/UpdateImageIDs.c (modified) (1 diff)
-
src/addstar.c (modified) (7 diffs)
-
src/loadgalphot_fit2d.c (modified) (4 diffs)
-
src/loadgalphot_readstars.c (modified) (5 diffs)
-
test/dvomerge.dvo (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150616/Ohana/src/addstar/include/addstar.h
r38467 r38501 190 190 AddstarClientOptions args PROTO((int argc, char **argv, AddstarClientOptions options)); 191 191 AddstarClientOptions args_parallel_client PROTO((int argc, char **argv, AddstarClientOptions options)); 192 void FreeConfig PROTO((void)); 192 193 193 194 void AddToCalibration PROTO((Average *average, SecFilt *secfilt, Measure *measure, Measure *new, off_t *next, off_t Nstar)); … … 230 231 Header **LoadHeaders PROTO((FILE *f, int *mode, int *Nheader)); 231 232 HeaderSet *MatchHeaders PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders)); 233 void HeaderSetFree PROTO((HeaderSet *headerSets, off_t NheaderSets)); 232 234 int LoadData PROTO((FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options)); 233 235 int GetZeroPointExposure PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages)); -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/include/loadgalphot.h
r38489 r38501 19 19 double c11; 20 20 double c02; 21 int ClipNiter; 22 float ClipNsigma; 21 23 } Fit2D; 22 24 -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ConfigInit.c
r38441 r38501 224 224 } 225 225 226 FreeConfigFile(); 226 227 free (config); 227 228 free (file); … … 240 241 return; 241 242 } 243 244 void FreeConfig (void) { 245 FREE (CATDIR); 246 } -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ImageIndex.c
r35579 r38501 1 1 # include "addstar.h" 2 3 void ImageIndexFree (ImageIndex *index) { 4 if (!index) return; 5 FREE (index->externID); 6 FREE (index->imageID); 7 FREE (index->found); 8 FREE (index); 9 } 2 10 3 11 ImageIndex *ImageIndexLoad (char *filename) { … … 16 24 if (!f) { 17 25 fprintf (stderr, "ERROR: cannot open image index file %s\n", filename); 26 FREE (index); 18 27 return NULL; 19 28 } … … 23 32 if (VERBOSE) fprintf (stderr, "can't read image index header\n"); 24 33 fclose (f); 34 FREE (index); 25 35 return NULL; 26 36 } … … 28 38 if (VERBOSE) fprintf (stderr, "can't read image index matrix\n"); 29 39 gfits_free_header (&header); 30 fclose (f);31 return NULL;32 }33 40 FREE (index); 41 fclose (f); 42 return NULL; 43 } 34 44 ftable.header = &theader; 35 45 … … 37 47 if (!gfits_load_header (f, &theader)) { 38 48 fclose (f); 49 gfits_free_header (&header); 50 FREE (index); 39 51 return NULL; 40 52 } … … 43 55 if (!gfits_fread_ftable_data (f, &ftable, FALSE)) { 44 56 fclose (f); 57 gfits_free_header (&header); 58 gfits_free_header (&theader); 59 FREE (index); 45 60 return (NULL); 46 61 } … … 76 91 } 77 92 93 gfits_free_header (&header); 94 gfits_free_matrix (&matrix); 95 gfits_free_header (&theader); 96 gfits_free_table (&ftable); 97 78 98 return index; 79 99 } … … 192 212 // do this as an 'extend' operation 193 213 ImageIndexSave (filename, index); 214 ImageIndexFree (index); 194 215 return TRUE; 195 216 } … … 209 230 // do this as an 'extend' operation 210 231 ImageIndexSave (filename, index); 232 ImageIndexFree (index); 211 233 return TRUE; 212 234 } -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadData.c
r37807 r38501 106 106 inStars = FilterStars (inStars, &images[0][Nvalid], Nvalid, options); 107 107 *stars = MergeStars (*stars, Nstars, inStars, images[0][Nvalid].nstar); 108 FREE (inStars); 109 108 110 Nvalid++; 109 111 CHECK_REALLOCATE (images[0], Image, NVALID, Nvalid, 10); -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadHeaders.c
r38467 r38501 17 17 status = gfits_fread_header (f, headers[i]); 18 18 if (!status) { 19 gfits_free_header (headers[i]); 20 FREE (headers[i]); 19 21 *Nheaders = i; 20 22 return (headers); -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadStars.c
r38467 r38501 3 3 Stars *LoadStars (char *filename, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options) { 4 4 5 off_t *extsize , NheaderSets;6 int i, Nfile, NFILE, Nheaders,mode;5 off_t *extsize; 6 int i, Nfile, NFILE, mode; 7 7 char **file, line[1024]; 8 8 FILE *f; 9 9 glob_t globList; 10 Header **headers;11 10 Stars *stars; 12 HeaderSet *headerSets;13 11 14 12 if (options[0].filelist) { … … 70 68 } 71 69 70 int Nheaders = 0; 71 Header **headers = NULL; 72 off_t NheaderSets = 0; 73 HeaderSet *headerSets = NULL; 74 72 75 // otherwise, we have FITS-table files: parse their headers to determine the contents 73 76 headers = LoadHeaders (f, &mode, &Nheaders); … … 75 78 if (headerSets == NULL) { 76 79 fprintf (stderr, "ERROR: can't read headers for %s\n", file[i]); 77 continue;80 goto next_file; 78 81 } 79 82 if (NheaderSets == 0) { 80 83 fprintf (stderr, "no object data in file %s, skipping\n", file[i]); 81 continue;84 goto next_file; 82 85 } 83 86 if (VERBOSE) fprintf (stderr, "file %s has %d headers, including "OFF_T_FMT" images\n", file[i], Nheaders, NheaderSets); … … 97 100 if (headerSets[0].exttype && !strcmp (headerSets[0].exttype, "SDSS_OBJ")) { 98 101 LoadDataSDSS (f, file[i], images, Nimages, &stars, Nstars, headers, extsize, headerSets, NheaderSets); 99 continue;102 goto next_file; 100 103 } 101 104 … … 103 106 if (headerSets[0].exttype && !strcmp (headerSets[0].exttype, "UKIRT_OBJ")) { 104 107 LoadDataUKIRT (f, file[i], images, Nimages, &stars, Nstars, headers, extsize, headerSets, NheaderSets); 105 continue;108 goto next_file; 106 109 } 107 110 … … 119 122 # endif 120 123 124 next_file: 125 HeaderSetFree (headerSets, NheaderSets); 126 int j; 127 for (j = 0; j < Nheaders; j++) { 128 gfits_free_header (headers[j]); 129 FREE (headers[j]); 130 } 131 FREE (headers); 132 FREE (extsize); 121 133 } 122 134 … … 129 141 } 130 142 143 for (i = 0; i < Nfile; i++) { 144 FREE (file[i]); 145 } 146 FREE (file); 147 131 148 return stars; 132 149 } -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/MatchHeaders.c
r38467 r38501 2 2 3 3 // XXX largely psphot specific 4 5 void HeaderSetFree (HeaderSet *headerSets, off_t NheaderSets) { 6 int i; 7 8 if (!headerSets) return; 9 for (i = 0; i < NheaderSets; i++) { 10 FREE (headerSets[i].exthead); 11 FREE (headerSets[i].exttype); 12 FREE (headerSets[i].extdata); 13 FREE (headerSets[i].extxrad); 14 } 15 FREE (headerSets); 16 } 4 17 5 18 HeaderSet *MatchHeaders (off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders) { … … 22 35 headerSets[Nimage].exthead = strcreate ("PHU"); 23 36 headerSets[Nimage].extdata = strcreate ("NONE"); 37 headerSets[Nimage].exttype = NULL; 38 headerSets[Nimage].extxrad = NULL; 24 39 headerSets[Nimage].extnum_data = -1; 25 40 headerSets[Nimage].extnum_head = 0; … … 34 49 headerSets[0].exttype = strcreate ("SDSS_OBJ"); 35 50 headerSets[0].exthead = strcreate ("PHU"); 51 headerSets[0].extxrad = NULL; 36 52 headerSets[0].extnum_head = 0; 37 53 headerSets[0].extnum_data = 1; … … 112 128 113 129 keep: 114 headerSets[Nimage].exttype = strcreate (exttype);115 116 130 gfits_scan (headers[i], ExtnameKeyword, "%s", 1, extname); 117 131 gfits_scan (headers[i], "EXTHEAD", "%s", 1, exthead); 118 132 133 headerSets[Nimage].exttype = strcreate (exttype); 119 134 headerSets[Nimage].extdata = strcreate (extname); 120 135 headerSets[Nimage].exthead = strcreate (exthead); … … 171 186 headerSets[Nimage].exttype = strcreate ("SMPDATA"); 172 187 headerSets[Nimage].exthead = strcreate ("PHU"); 188 headerSets[Nimage].extxrad = NULL; 173 189 headerSets[Nimage].extnum_head = 0; 174 190 headerSets[Nimage].extnum_data = 1; -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ReadStarsFITS.c
r38441 r38501 125 125 return (NULL); 126 126 } 127 128 gfits_free_table (&table); 129 127 130 // Nstars is not necessarily == *nstars (The former is the number of detections, the 128 131 // latter are the 'good' detections reported by the photometry system. -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/UpdateImageIDs.c
r38467 r38501 87 87 88 88 dvo_image_unlock (&db); 89 gfits_db_free (&db); 89 90 90 91 return TRUE; -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/addstar.c
r38471 r38501 10 10 off_t i, Nimages; 11 11 off_t Naverage, Nmeasure, Nlensing; 12 Stars *stars, **subset;13 Image *images;14 12 Catalog catalog; 15 13 FITS_DB db; … … 48 46 MARKTIME ("init and config: %f sec\n", dtime); RESETTIME; 49 47 50 stars = NULL; 48 Stars *stars = NULL; 49 Image *images = NULL; 51 50 52 51 /*** load in the new data (images, stars) ***/ … … 155 154 case ADDSTAR_MODE_REFCAT: 156 155 stars = greference (argv[1], skylist[0].regions[i], options.photcode, &Nstars); 157 case ADDSTAR_MODE_REFLIST: 158 subset = find_subset (skylist[0].regions[i], stars, Nstars, &Nsubset);156 case ADDSTAR_MODE_REFLIST: { 157 Stars **subset = find_subset (skylist[0].regions[i], stars, Nstars, &Nsubset); 159 158 if (options.closest) { 160 159 Nmatch += find_matches_closest_refstars (skylist[0].regions[i], subset, Nsubset, &catalog, options); … … 164 163 if (Nsubset) free (subset); 165 164 break; 165 } 166 166 } 167 167 if (VERBOSE) MARKTIME ("match stars: %f sec\n", dtime); RESETTIME; … … 189 189 if (options.mode == ADDSTAR_MODE_REFCAT) free (stars); 190 190 } 191 SkyListFree (skylist); 192 193 if (options.mode != ADDSTAR_MODE_REFCAT) { 194 FREE (stars); 195 } 191 196 192 197 // We only measure a single value for the entire mosaic (add all images to this function) … … 218 223 SetProtect (FALSE); 219 224 } 225 FREE (images); 220 226 dvo_image_unlock (&db); /* unlock? */ 227 gfits_db_free (&db); /* unlock? */ 221 228 222 229 gettimeofday (&stopAddstar, (void *) NULL); … … 224 231 fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for %5d stars (%5d matches), "OFF_T_FMT" average, "OFF_T_FMT" measure, "OFF_T_FMT" lensing\n", dtime, Nstars, Nmatch, Naverage, Nmeasure, Nlensing); 225 232 233 // XXX test 234 FreeConfig (); 235 FreePhotcodeTable (); 236 SkyTableFree (sky); 237 ohana_memcheck (1); 238 ohana_memdump (1); 226 239 exit (0); 227 240 } -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/loadgalphot_fit2d.c
r38489 r38501 15 15 fit->wterm = fit->nterm*(fit->nterm + 1)/2; 16 16 fit->mterm = 2*order + 1; 17 18 fit->ClipNiter = 1; 19 fit->ClipNsigma = 0.0; 17 20 18 21 /* allocate the summation matrices */ … … 87 90 float *x, *y, *z, *zf; 88 91 89 float ClipNSigma = 0; 90 int ClipNiter = 1; 91 92 for (N = 0; N < ClipNiter; N++) { 92 for (N = 0; N < fit->ClipNiter; N++) { 93 93 fit2d_reset (fit); 94 94 … … 209 209 mean = dZ / Npt; 210 210 sigma = sqrt (fabs(dZ2/Npt - SQ(mean))); 211 maxsigma = ClipNSigma * sigma;211 maxsigma = fit->ClipNsigma * sigma; 212 212 213 213 // if (VERBOSE) gprint (GP_ERR, "mean: %g, sigma: %g, maxsigma: %g\n", mean, sigma, maxsigma); … … 219 219 zf = zfit; 220 220 int Nmask = 0; 221 for (i = 0; ClipNSigma&& (i < Npts); i++, x++, y++, z++, zf++) {221 for (i = 0; fabs(fit->ClipNsigma) > 0.001 && (i < Npts); i++, x++, y++, z++, zf++) { 222 222 float dZi = (*z - *zf); 223 223 if (fabs(dZi) > maxsigma) { -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/loadgalphot_readstars.c
r38488 r38501 35 35 fclose (f); 36 36 return NULL; 37 } 38 39 { 40 Header header_xfit; 41 FTable ftable_xfit; 42 43 if (!gfits_find_Xheader (f, &header_xfit, "SkyChip.xfit")) { 44 if (VERBOSE) fprintf (stderr, "can't read galaxy photometry header\n"); 45 gfits_free_header (&header_xfit); 46 gfits_free_header (&PHU); 47 fclose (f); 48 return NULL; 49 } 50 51 ftable_xfit.header = &header_xfit; 52 53 if (!gfits_fread_ftable_data (f, &ftable_xfit, FALSE)) { 54 if (VERBOSE) fprintf (stderr, "can't read galaxy photometry data\n"); 55 gfits_free_header (&header_xfit); 56 gfits_free_header (&PHU); 57 fclose (f); 58 return (NULL); 59 } 60 61 char type[16]; 62 int firstCol = TRUE; 63 64 GET_COLUMN (ID_fit, "IPP_IDET", int); 65 GET_COLUMN (MODEL_TYPE_fit,"MODEL_TYPE", char); NcharModel = Ncol;. 66 GET_COLUMN (EXT_WIDTH_MAJ, "EXT_WIDTH_MAJ", float); 67 GET_COLUMN (EXT_WIDTH_MIN, "EXT_WIDTH_MIN", float); 68 GET_COLUMN (EXT_THETA, "EXT_THETA", float); 69 GET_COLUMN (EXT_THETA_ERR, "EXT_THETA_ERR", float); 70 GET_COLUMN (INDEX, "EXT_PAR_07", float); 71 72 // free the memory associated with the FITS files 73 gfits_free_header (&header); 74 gfits_free_table (&ftable); 37 75 } 38 76 … … 92 130 93 131 Fit2D *fit = fit2d_init (2); 132 fit->ClipNiter = 3; 133 fit->ClipNsigma = 5.0; 94 134 95 135 int Nbad = 0; … … 185 225 Xpt[i] = MajorMin + MajorDel*iX; 186 226 Ypt[i] = MinorMin + MinorDel*iY; 227 Nvalid ++; 187 228 if (chisq[i] < chisqMin) { 188 229 chisqMin = chisq[i]; 189 230 iMin = i; 190 Nvalid ++; 191 } 192 } 193 if (!Nvalid) return FALSE; // we cannot do anything if there is no finite chisq 231 } 232 } 233 if (!Nvalid) { 234 fprintf (stderr, "no good points\n"); 235 return FALSE; // we cannot do anything if there is no finite chisq 236 } 194 237 195 238 if (Nvalid < 6) { … … 198 241 galphot->majorAxisErr = MajorDel; 199 242 galphot->minorAxisErr = MinorDel; 243 fprintf (stderr, "too few good points: %d\n", Nvalid); 200 244 return FALSE; 201 245 } 202 246 203 // find the list of distances from the min point204 for (i = 0; i < Npts; i++) {205 Rpt[i] = hypot(Xpt[i] - Xpt[iMin], Ypt[i] - Ypt[iMin]);206 // only include unmasked points207 if (mask[i]) {208 Rsr[i] = FLT_MAX;209 } else {210 Rsr[i] = Rpt[i];211 }212 }213 214 // sorts the distances in ascending order215 fsort (Rsr, Npts);216 int Nmin = MIN(Nvalid, 9);217 218 float Rmax = Rsr[Nmin-1];219 for (i = 0; i < Npts; i++) {220 if (Rpt[i] > Rmax) mask[i] = TRUE;221 }222 223 // fit the inner 9 points224 if (!fit2d (fit, Xpt, Ypt, chisq, chisqFit, mask, Npts)) {225 // raise a flag?226 galphot->majorAxis = Xpt[iMin];227 galphot->minorAxis = Ypt[iMin];228 galphot->majorAxisErr = MajorDel;229 galphot->minorAxisErr = MinorDel;230 return FALSE;231 }232 233 // exclude any extreme outliers234 float maxSigma = 5.0*fit->sigma;235 236 memset (mask, 0, Npts*sizeof(char));237 for (i = 0; i < Npts; i++) {238 if (!isfinite(chisq[i])) { mask[i] = TRUE; continue; }239 float dZ = chisq[i] - chisqFit[i];240 if (fabs(dZ) > maxSigma) { mask[i] = TRUE; continue; }241 }242 243 247 // re-fit all except the most extreme set 244 248 if (!fit2d (fit, Xpt, Ypt, chisq, chisqFit, mask, Npts)) { … … 248 252 galphot->majorAxisErr = MajorDel; 249 253 galphot->minorAxisErr = MinorDel; 254 fprintf (stderr, "failed fit\n"); 250 255 return FALSE; 251 256 } -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/test/dvomerge.dvo
r29938 r38501 2 2 3 3 input tap.dvo 4 5 macro test.all 6 $TAP_VERBOSE = 1 7 test.dvomerge.update.new 8 end 4 9 5 10 # create 2 populated catdirs, each with a couple of cmf files … … 8 13 tapPLAN 51 9 14 10 execrm -rf catdir.test111 execrm -rf catdir.test212 execrm -rf catdir.test315 tapEXEC rm -rf catdir.test1 16 tapEXEC rm -rf catdir.test2 17 tapEXEC rm -rf catdir.test3 13 18 14 19 $RA = 10.0 … … 16 21 17 22 mkinput 18 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec 10.0 20.019 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf20 21 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec 10.0 20.022 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf23 24 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec 9.9 20.025 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf26 27 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec 9.9 20.028 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf29 30 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 05:00:00 -radec 10.0 19.931 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf32 33 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 06:00:00 -radec 10.0 19.934 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf35 36 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 07:00:00 -radec 9.9 19.937 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf38 39 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 08:00:00 -radec 9.9 19.940 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf23 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec 10.0 20.0 24 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 25 26 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec 10.0 20.0 27 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 28 29 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec 9.9 20.0 30 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 31 32 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec 9.9 20.0 33 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 34 35 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 05:00:00 -radec 10.0 19.9 36 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 37 38 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 06:00:00 -radec 10.0 19.9 39 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 40 41 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 07:00:00 -radec 9.9 19.9 42 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 43 44 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 08:00:00 -radec 9.9 19.9 45 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 41 46 42 47 break 43 48 44 execrsync -auc catdir.test2/ catdir.test3/49 tapEXEC rsync -auc catdir.test2/ catdir.test3/ 45 50 46 51 date -var t1 -seconds -reftime 1276000000 47 execdvomerge catdir.test1 into catdir.test352 tapEXEC dvomerge catdir.test1 into catdir.test3 48 53 date -var t2 -seconds -reftime 1276000000 49 54 echo "merge time: {$t2 - $t1}" … … 114 119 end 115 120 116 # execrm test.in.txt test.cmf117 # execrm -rf catdir.test1118 # execrm -rf catdir.test2119 # execrm -rf catdir.test3121 # tapEXEC rm test.in.txt test.cmf 122 # tapEXEC rm -rf catdir.test1 123 # tapEXEC rm -rf catdir.test2 124 # tapEXEC rm -rf catdir.test3 120 125 121 126 tapDONE … … 127 132 tapPLAN 51 128 133 129 execrm -rf catdir.test1130 execrm -rf catdir.test2131 execrm -rf catdir.test3134 tapEXEC rm -rf catdir.test1 135 tapEXEC rm -rf catdir.test2 136 tapEXEC rm -rf catdir.test3 132 137 133 138 $RA = 10.0 … … 135 140 136 141 mkinput 137 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC 138 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf 139 140 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC 141 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf 142 143 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC 144 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf 145 146 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC 147 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf 148 149 break 150 151 exec rsync -auc catdir.test2/ catdir.test3/ 142 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC 143 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 144 145 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC 146 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 147 148 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC 149 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 150 151 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC 152 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 153 154 tapEXEC rsync -auc catdir.test2/ catdir.test3/ 152 155 153 156 date -var t1 -seconds -reftime 1276000000 154 execdvomerge catdir.test1 into catdir.test3157 tapEXEC dvomerge catdir.test1 into catdir.test3 155 158 date -var t2 -seconds -reftime 1276000000 156 159 echo "merge time: {$t2 - $t1}" … … 221 224 end 222 225 223 # execrm test.in.txt test.cmf224 # execrm -rf catdir.test1225 # execrm -rf catdir.test2226 # execrm -rf catdir.test3226 # tapEXEC rm test.in.txt test.cmf 227 # tapEXEC rm -rf catdir.test1 228 # tapEXEC rm -rf catdir.test2 229 # tapEXEC rm -rf catdir.test3 227 230 228 231 tapDONE … … 234 237 tapPLAN 51 235 238 236 execrm -rf catdir.test1237 execrm -rf catdir.test2239 tapEXEC rm -rf catdir.test1 240 tapEXEC rm -rf catdir.test2 238 241 239 242 $RA = 10.0 … … 241 244 242 245 mkinput 243 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC244 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf245 246 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC247 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf246 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC 247 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 248 249 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC 250 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 248 251 249 252 date -var t1 -seconds -reftime 1276000000 250 execdvomerge catdir.test1 into catdir.test2253 tapEXEC dvomerge catdir.test1 into catdir.test2 251 254 date -var t2 -seconds -reftime 1276000000 252 255 echo "merge time: {$t2 - $t1}" … … 297 300 end 298 301 299 # execrm test.in.txt test.cmf300 # execrm -rf catdir.test1301 # execrm -rf catdir.test2302 # execrm -rf catdir.test3302 # tapEXEC rm test.in.txt test.cmf 303 # tapEXEC rm -rf catdir.test1 304 # tapEXEC rm -rf catdir.test2 305 # tapEXEC rm -rf catdir.test3 303 306 304 307 tapDONE … … 310 313 tapPLAN 51 311 314 312 execrm -rf catdir.test1313 execrm -rf catdir.test2314 execrm -rf catdir.test3315 tapEXEC rm -rf catdir.test1 316 tapEXEC rm -rf catdir.test2 317 tapEXEC rm -rf catdir.test3 315 318 316 319 $RA = 10.0 … … 318 321 319 322 mkinput 320 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC321 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf322 323 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC324 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf323 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC 324 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 325 326 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC 327 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 325 328 326 329 # generate a few extra unmatched sources 327 330 mkinput.extras 328 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC329 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf330 331 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC332 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf333 334 execrsync -auc catdir.test2/ catdir.test3/335 336 execdvomerge catdir.test1 into catdir.test3331 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC 332 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 333 334 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC 335 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 336 337 tapEXEC rsync -auc catdir.test2/ catdir.test3/ 338 339 tapEXEC dvomerge catdir.test1 into catdir.test3 337 340 338 341 catdir catdir.test3 … … 401 404 end 402 405 403 # execrm test.in.txt test.cmf404 # execrm -rf catdir.test1405 # execrm -rf catdir.test2406 # execrm -rf catdir.test3406 # tapEXEC rm test.in.txt test.cmf 407 # tapEXEC rm -rf catdir.test1 408 # tapEXEC rm -rf catdir.test2 409 # tapEXEC rm -rf catdir.test3 407 410 408 411 tapDONE … … 414 417 tapPLAN 21 415 418 416 execrm -rf catdir.test1417 execrm -rf catdir.test2418 execrm -rf catdir.test3419 tapEXEC rm -rf catdir.test1 420 tapEXEC rm -rf catdir.test2 421 tapEXEC rm -rf catdir.test3 419 422 420 423 $RA = 10.0 … … 422 425 423 426 mkinput 424 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC425 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf426 427 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC428 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf429 430 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC431 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf432 433 execmkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC434 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf435 436 execdvomerge catdir.test1 and catdir.test2 to catdir.test3427 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC 428 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 429 430 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC 431 tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass 432 433 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC 434 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 435 436 tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC 437 tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass 438 439 tapEXEC dvomerge catdir.test1 and catdir.test2 to catdir.test3 437 440 438 441 catdir catdir.test3 … … 501 504 end 502 505 503 # execrm test.in.txt test.cmf504 # execrm -rf catdir.test1505 # execrm -rf catdir.test2506 # execrm -rf catdir.test3506 # tapEXEC rm test.in.txt test.cmf 507 # tapEXEC rm -rf catdir.test1 508 # tapEXEC rm -rf catdir.test2 509 # tapEXEC rm -rf catdir.test3 507 510 508 511 tapDONE … … 511 514 # make a simple input file for mkcmf 512 515 macro mkinput.alt 513 execrm -f test.in.txt516 tapEXEC rm -f test.in.txt 514 517 515 518 output test.in.txt … … 524 527 # make a simple input file for mkcmf 525 528 macro mkinput 526 execrm -f test.in.txt529 tapEXEC rm -f test.in.txt 527 530 528 531 output test.in.txt … … 537 540 # make a simple input file for mkcmf 538 541 macro mkinput.extras 539 execrm -f test.in.txt542 tapEXEC rm -f test.in.txt 540 543 541 544 output test.in.txt
Note:
See TracChangeset
for help on using the changeset viewer.
