Changeset 28338 for branches/czw_branch/20100519/Ohana
- Timestamp:
- Jun 15, 2010, 1:12:26 PM (16 years ago)
- Location:
- branches/czw_branch/20100519
- Files:
-
- 18 edited
- 1 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/addstar/test (modified) (1 prop)
-
Ohana/src/addstar/test/dvomerge.dvo (modified) (5 diffs)
-
Ohana/src/dvomerge/src/LoadCatalog.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvomerge.c (modified) (1 diff)
-
Ohana/src/dvomerge/src/dvomergeUpdate.c (modified) (5 diffs)
-
Ohana/src/dvomerge/src/merge_catalogs_old.c (modified) (8 diffs)
-
Ohana/src/libdvo/src/SavePhotcodesText.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/create.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/help/histogram (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/help/imhist (copied) (copied from trunk/Ohana/src/opihi/cmd.data/help/imhist )
-
Ohana/src/opihi/dvo/gstar.c (modified) (3 diffs)
-
Ohana/src/opihi/pcontrol/StartJob.c (modified) (1 diff)
-
Ohana/src/photdbc/include/photdbc.h (modified) (1 diff)
-
Ohana/src/photdbc/src/ConfigInit.c (modified) (1 diff)
-
Ohana/src/photdbc/src/copy_images.c (modified) (2 diffs)
-
Ohana/src/photdbc/src/make_subcatalog.c (modified) (2 diffs)
-
Ohana/src/photdbc/src/photdbc.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20100519
- Property svn:mergeinfo changed
/trunk merged: 28308-28311,28313,28317,28319-28332,28335-28337
- Property svn:mergeinfo changed
-
branches/czw_branch/20100519/Ohana
- Property svn:mergeinfo changed
/trunk/Ohana merged: 28317,28324-28331,28335-28337
- Property svn:mergeinfo changed
-
branches/czw_branch/20100519/Ohana/src/addstar/test
- Property svn:ignore
-
old new 4 4 test.in.txt 5 5 catdir.test 6 catdir.test1 7 catdir.test2 8 catdir.test3 6 9 .dvo 7 10 relphot.airmass.png
-
- Property svn:ignore
-
branches/czw_branch/20100519/Ohana/src/addstar/test/dvomerge.dvo
r27435 r28338 105 105 end 106 106 107 # create 2 populated catdirs, each with a couple of cmf files 108 macro test.dvomerge. create109 110 tapPLAN 21107 # create 2 populated catdirs, each with a couple of cmf files -- force some unmatched objects 108 macro test.dvomerge.update.extras 109 110 tapPLAN 51 111 111 112 112 exec rm -rf catdir.test1 … … 124 124 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf 125 125 126 # generate a few extra unmatched sources 127 mkinput.extras 126 128 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC 127 129 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf … … 130 132 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf 131 133 132 exec dvomerge catdir.test1 and catdir.test2 to catdir.test3 134 exec rsync -auc catdir.test2/ catdir.test3/ 135 136 exec dvomerge catdir.test1 into catdir.test3 133 137 134 138 catdir catdir.test3 … … 205 209 end 206 210 211 # create 2 populated catdirs, each with a couple of cmf files 212 macro test.dvomerge.create 213 214 tapPLAN 21 215 216 exec rm -rf catdir.test1 217 exec rm -rf catdir.test2 218 exec rm -rf catdir.test3 219 220 $RA = 10.0 221 $DEC = 20.0 222 223 mkinput 224 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC 225 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf 226 227 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC 228 exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf 229 230 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC 231 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf 232 233 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC 234 exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf 235 236 exec dvomerge catdir.test1 and catdir.test2 to catdir.test3 237 238 catdir catdir.test3 239 skyregion {$RA-1} {$RA+1} {$DEC-1} {$DEC+1} 240 mextract ra dec mag 241 create n 0 ra[] 242 subset r0 = ra if (n % 4 == 0) 243 subset r1 = ra if (n % 4 == 1) 244 subset r2 = ra if (n % 4 == 2) 245 subset r3 = ra if (n % 4 == 3) 246 247 catdir catdir.test1/ 248 mextract RA DEC MAG 249 create N 0 RA[] 250 subset R0 = RA if (N % 2 == 0) 251 subset R1 = RA if (N % 2 == 1) 252 253 set dr0 = r0 - R0 254 vstat -q dr0 255 tapOK {abs($MEAN) < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)" 256 tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)" 257 258 set dr1 = r1 - R1 259 vstat -q dr1 260 tapOK {abs($MEAN) < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)" 261 tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)" 262 263 catdir catdir.test2/ 264 mextract RA DEC MAG 265 create N 0 RA[] 266 subset R2 = RA if (N % 2 == 0) 267 subset R3 = RA if (N % 2 == 1) 268 269 set dr2 = r2 - R2 270 vstat -q dr2 271 tapOK {abs($MEAN) < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)" 272 tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)" 273 274 set dr3 = r3 - R3 275 vstat -q dr3 276 tapOK {abs($MEAN) < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)" 277 tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)" 278 279 # check on updates to imageID 280 catdir catdir.test3 281 imextract imageID 282 sort imageID 283 tapOK {imageID[] == 4} "image IDs exist" 284 tapOK {imageID[0] == 1} "updated image IDs" 285 tapOK {imageID[1] == 2} "updated image IDs" 286 tapOK {imageID[2] == 3} "updated image IDs" 287 tapOK {imageID[3] == 4} "updated image IDs" 288 289 catdir catdir.test3 290 mextract imageID, time 291 set id = imageID 292 set t = time 293 imextract imageID, time 294 295 for i 0 time[] 296 subset T = t if (id == imageID[$i]) 297 set dT = T - time[$i] 298 vstat -q dT 299 tapOK {abs($MEAN) < 0.00001} "time for measure ID $i (MEAN)" 300 tapOK {abs($SIGMA) < 0.00001} "time for measure ID $i (SIGMA)" 301 end 302 303 # exec rm test.in.txt test.cmf 304 # exec rm -rf catdir.test1 305 # exec rm -rf catdir.test2 306 # exec rm -rf catdir.test3 307 308 tapDONE 309 end 310 207 311 # make a simple input file for mkcmf 208 312 macro mkinput.alt … … 225 329 for i 10 1024 100 226 330 for j 10 1024 100 331 fprintf " %4d %4d %6.2f" $i $j {-15.0 + 2.5*($i + $j)/1000.0} 332 end 333 end 334 output stdout 335 end 336 337 # make a simple input file for mkcmf 338 macro mkinput.extras 339 exec rm -f test.in.txt 340 341 output test.in.txt 342 for i 10 1024 100 343 for j 10 1024 100 344 fprintf " %4d %4d %6.2f" $i $j {-15.0 + 2.5*($i + $j)/1000.0} 345 end 346 end 347 for i 20 1024 500 348 for j 20 1024 500 227 349 fprintf " %4d %4d %6.2f" $i $j {-15.0 + 2.5*($i + $j)/1000.0} 228 350 end -
branches/czw_branch/20100519/Ohana/src/dvomerge/src/LoadCatalog.c
r24745 r28338 7 7 catalog[0].Nsecfilt = GetPhotcodeNsecfilt (); 8 8 9 if (!strcmp (mode, "w")) { 10 catalog[0].catflags = LOAD_NONE; 11 } else { 12 catalog[0].catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; 13 } 9 // always load all of the data (if any exists) 10 catalog[0].catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; 14 11 15 12 catalog[0].catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data -
branches/czw_branch/20100519/Ohana/src/dvomerge/src/dvomerge.c
r27583 r28338 7 7 ConfigInit (&argc, argv); 8 8 dvomerge_args (&argc, argv); 9 10 // XXX require both inputs to be sorted? 9 11 10 12 if (argc == 6) dvomergeCreate (argc, argv); -
branches/czw_branch/20100519/Ohana/src/dvomerge/src/dvomergeUpdate.c
r27583 r28338 16 16 output = argv[3]; 17 17 18 // the first input defines the photcode table & db layout 19 sprintf (filename, "%s/Photcodes.dat", input); 18 // since we are merging the input db into the output db, the output defines the photcode 19 // table & db layout but, this requires the output to exist. if it does not, instead use the 20 // input. 21 sprintf (filename, "%s/Photcodes.dat", output); 20 22 if (!LoadPhotcodes (filename, NULL, FALSE)) { 21 fprintf (stderr, "error loading photcode table %s\n", filename); 22 exit (1); 23 sprintf (filename, "%s/Photcodes.dat", input); 24 if (!LoadPhotcodes (filename, NULL, FALSE)) { 25 fprintf (stderr, "error loading photcode table: tried %s/Photcodes.dat and %s/Photcodes.dat\n", output, input); 26 exit (1); 27 } 23 28 } 24 29 … … 27 32 // load the sky table for the existing database 28 33 insky = SkyTableLoadOptimal (input, NULL, NULL, FALSE, SKY_DEPTH_HST, VERBOSE); 34 if (!insky) { 35 Shutdown ("can't read SkyTable for %s", input); 36 } 29 37 SkyTableSetFilenames (insky, input, "cpt"); 30 38 31 39 // generate an output table populated at the desired depth 32 outsky = SkyTableLoadOptimal (output, NULL, NULL, TRUE, SKY_DEPTH, VERBOSE); 40 outsky = SkyTableLoadOptimal (output, NULL, GSCFILE, TRUE, SKY_DEPTH, VERBOSE); 41 if (!outsky) { 42 Shutdown ("can't read or create SkyTable for %s", output); 43 } 33 44 SkyTableSetFilenames (outsky, output, "cpt"); 34 45 … … 43 54 if (VERBOSE) fprintf (stderr, "output: %s\n", outsky[0].regions[i].name); 44 55 45 // load / create output catalog 46 LoadCatalog (&outcatalog, &outsky[0].regions[i], outsky[0].filename[i], " a");56 // load / create output catalog (if catalog does not exist, it will be created) 57 LoadCatalog (&outcatalog, &outsky[0].regions[i], outsky[0].filename[i], "w"); 47 58 48 59 // combine only tables at equal or larger depth … … 102 113 // load the image table 103 114 if (inDB.dbstate == LCK_EMPTY) { 104 Shutdown ("can't find input (1)image catalog %s", inDB.filename);115 Shutdown ("can't find input image catalog %s", inDB.filename); 105 116 } 106 117 if (!dvo_image_load (&inDB, VERBOSE, TRUE)) { 107 Shutdown ("can't read input (1)image catalog %s", inDB.filename);118 Shutdown ("can't read input image catalog %s", inDB.filename); 108 119 } 109 120 … … 117 128 /* load the image table */ 118 129 if (outDB.dbstate == LCK_EMPTY) { 119 Shutdown ("can't find input (2) image catalog %s", outDB.filename); 120 } 121 if (!dvo_image_load (&outDB, VERBOSE, TRUE)) { 122 Shutdown ("can't read input (2) image catalog %s", outDB.filename); 130 dvo_image_create (&outDB, GetZeroPoint()); 131 } else { 132 if (!dvo_image_load (&outDB, VERBOSE, TRUE)) { 133 Shutdown ("can't read output image catalog %s", outDB.filename); 134 } 123 135 } 124 136 -
branches/czw_branch/20100519/Ohana/src/dvomerge/src/merge_catalogs_old.c
r28304 r28338 63 63 tcoords.Npolyterms = 1; 64 64 strcpy (tcoords.ctype, "RA---ARC"); 65 66 if (VERBOSE) fprintf (stderr, "merging %s into %s\n", input[0].filename, output[0].filename); 65 67 66 68 /* build spatial index (RA sort) referencing input array sequence */ … … 161 163 REALLOCATE (output[0].measure, Measure, NMEAS); 162 164 } 165 166 // 4) average properties from the input and the output db need to be properly merged. 163 167 164 168 /** add ALL measurements for this input average object **/ … … 209 213 } 210 214 215 // update the average properties to reflect the incoming entries: 216 // if the original value is NAN but the input value is not, accept the input: 217 for (j = 0; j < Nsecfilt; j++) { 218 if ( isfinite(output[0].secfilt[n*Nsecfilt+j].M)) continue; 219 if (!isfinite( input[0].secfilt[N*Nsecfilt+j].M)) continue; 220 output[0].secfilt[n*Nsecfilt+j].M = input[0].secfilt[N*Nsecfilt+j].M; 221 output[0].secfilt[n*Nsecfilt+j].dM = input[0].secfilt[N*Nsecfilt+j].dM; 222 output[0].secfilt[n*Nsecfilt+j].Xm = input[0].secfilt[N*Nsecfilt+j].Xm; 223 output[0].secfilt[n*Nsecfilt+j].M_20 = input[0].secfilt[N*Nsecfilt+j].M_20; 224 output[0].secfilt[n*Nsecfilt+j].M_80 = input[0].secfilt[N*Nsecfilt+j].M_80; 225 output[0].secfilt[n*Nsecfilt+j].Ncode = input[0].secfilt[N*Nsecfilt+j].Ncode; 226 output[0].secfilt[n*Nsecfilt+j].Nused = input[0].secfilt[N*Nsecfilt+j].Nused; 227 } 228 211 229 /* Nm is updated, but not written out in -update mode (for existing entries) 212 230 Nm is recalculated in build_meas_links if loaded table is not sorted */ … … 242 260 if (!IN_REGION (input[0].average[N].R, input[0].average[N].D)) continue; 243 261 262 // XXX should we accept the input measurements for the fields? 263 244 264 output[0].average[Nave].R = input[0].average[N].R; 245 265 output[0].average[Nave].D = input[0].average[N].D; … … 247 267 output[0].average[Nave].dD = 0; 248 268 249 output[0].average[Nave].Nmeasure = 1;269 output[0].average[Nave].Nmeasure = 0; // this value is update as the measurements are associated with this entry below 250 270 output[0].average[Nave].Nmissing = 0; 251 271 output[0].average[Nave].Nextend = 0; … … 282 302 283 303 for (j = 0; j < Nsecfilt; j++) { 284 output[0].secfilt[Nave*Nsecfilt+j].M = NAN; 285 output[0].secfilt[Nave*Nsecfilt+j].dM = NAN; 286 output[0].secfilt[Nave*Nsecfilt+j].Xm = NAN_S_SHORT; 287 output[0].secfilt[Nave*Nsecfilt+j].M_20 = NAN_S_SHORT; 288 output[0].secfilt[Nave*Nsecfilt+j].M_80 = NAN_S_SHORT; 289 output[0].secfilt[Nave*Nsecfilt+j].Ncode = 0; 290 output[0].secfilt[Nave*Nsecfilt+j].Nused = 0; 304 if (isfinite(input[0].secfilt[N*Nsecfilt+j].M)) { 305 output[0].secfilt[Nave*Nsecfilt+j].M = input[0].secfilt[N*Nsecfilt+j].M; 306 output[0].secfilt[Nave*Nsecfilt+j].dM = input[0].secfilt[N*Nsecfilt+j].dM; 307 output[0].secfilt[Nave*Nsecfilt+j].Xm = input[0].secfilt[N*Nsecfilt+j].Xm; 308 output[0].secfilt[Nave*Nsecfilt+j].M_20 = input[0].secfilt[N*Nsecfilt+j].M_20; 309 output[0].secfilt[Nave*Nsecfilt+j].M_80 = input[0].secfilt[N*Nsecfilt+j].M_80; 310 output[0].secfilt[Nave*Nsecfilt+j].Ncode = input[0].secfilt[N*Nsecfilt+j].Ncode; 311 output[0].secfilt[Nave*Nsecfilt+j].Nused = input[0].secfilt[N*Nsecfilt+j].Nused; 312 } else { 313 output[0].secfilt[Nave*Nsecfilt+j].M = NAN; 314 output[0].secfilt[Nave*Nsecfilt+j].dM = NAN; 315 output[0].secfilt[Nave*Nsecfilt+j].Xm = NAN_S_SHORT; 316 output[0].secfilt[Nave*Nsecfilt+j].M_20 = NAN_S_SHORT; 317 output[0].secfilt[Nave*Nsecfilt+j].M_80 = NAN_S_SHORT; 318 output[0].secfilt[Nave*Nsecfilt+j].Ncode = 0; 319 output[0].secfilt[Nave*Nsecfilt+j].Nused = 0; 320 } 291 321 } 292 322 … … 304 334 output[0].measure[Nmeas].catID = output[0].catID; 305 335 306 /* next[Nmeas] should always be -1 in this context (it is always the only 307 measurement for the star) */ 336 // as we add measurements, update Nmeasure to match 337 output[0].average[Nave].Nmeasure ++; 338 339 /* we set next[Nmeas] to -1 here, and update correctly below */ 308 340 input[0].found[N] = Nmeas; 309 341 next_meas[Nmeas] = -1; … … 327 359 # endif 328 360 329 # define NOSORT FALSE361 # define NOSORT 0 330 362 if (NOSORT) { 331 363 output[0].sorted = FALSE; -
branches/czw_branch/20100519/Ohana/src/libdvo/src/SavePhotcodesText.c
r17190 r28338 69 69 type, 70 70 table[0].code[i].C*SCALE, 71 table[0].code[i].K *SCALE,71 table[0].code[i].K, 72 72 table[0].code[i].dC*SCALE); 73 73 -
branches/czw_branch/20100519/Ohana/src/opihi/cmd.data/create.c
r27817 r28338 4 4 5 5 int i, N, INT; 6 float start, end, delta;6 opihi_flt start, end, delta; 7 7 Vector *vec; 8 8 -
branches/czw_branch/20100519/Ohana/src/opihi/cmd.data/help/histogram
r4688 r28338 1 1 2 histogram < buffer> <x> <y> [-region sx sy nx ny] [-range min max]2 histogram <invec> <outvec> <start> <end> [<delta>] [-range <dx_outvec>] 3 3 4 calculate a histogram of the image pixel values in the given 5 buffer, optionally constrained to the given region, with optional 6 max and min values. the results are placed in the vectors x and y, 7 which contain the pixel values and the number of occurences. 4 calculate a histogram of the <invec> values and store the 5 occurrences count in the <outvec> buffer. Optionally constrained to 6 the given <start>-<end> region with <delta> step value (default 7 step is 1). The optional '-range <dx_outvec>' parameter allows storing 8 the range <start>-<end> values with <delta> increment 8 9 10 Sample code usage: 11 12 # create a vector ('x') containing arbitrary values [0.:1.] range 13 create y 0 100 1; set x = sin(y) 14 15 # build histogram from x from 0. to 1. with 0.1 delta step 16 histogram x xhist 0. 1. .1 -range dx 17 18 # plot corresponding histogram 19 limits dx xhist; clear; box; plot dx xhist -x 1 -
branches/czw_branch/20100519/Ohana/src/opihi/dvo/gstar.c
r28304 r28338 165 165 gprint (GP_LOG, "%3d ", catalog.average[k].Nmeasure); 166 166 gprint (GP_LOG, "%4.1f ", 0.01*catalog.average[k].Xp); 167 gprint (GP_LOG, "%5d ", catalog.average[k].flags); 167 gprint (GP_LOG, "%5x ", catalog.average[k].flags); 168 gprint (GP_LOG, "%x ", catalog.average[k].objID); 169 gprint (GP_LOG, "%x ", catalog.average[k].catID); 168 170 169 171 if (FULL_OUTPUT) { … … 176 178 gprint (GP_LOG, "%f ", catalog.average[k].P); 177 179 gprint (GP_LOG, "%f ", catalog.average[k].dP); 178 gprint (GP_LOG, "%x ", catalog.average[k].objID);179 gprint (GP_LOG, "%x ", catalog.average[k].catID);180 180 } 181 181 … … 244 244 gprint (GP_LOG, "%f ", catalog.measure[m].crNsigma); 245 245 gprint (GP_LOG, "%f ", catalog.measure[m].extNsigma); 246 gprint (GP_LOG, "%f ", 0.01*catalog.measure[m].FWx);247 gprint (GP_LOG, "%f ", 0.01*catalog.measure[m].FWy);248 246 gprint (GP_LOG, "%f ", (360.0/(float)0xffff)*catalog.measure[m].theta); 249 247 } -
branches/czw_branch/20100519/Ohana/src/opihi/pcontrol/StartJob.c
r28304 r28338 36 36 } 37 37 38 fprintf (stderr, "command: %s\n", line);38 // fprintf (stderr, "command: %s\n", line); 39 39 40 40 status = PclientCommand (host, line, PCLIENT_PROMPT, PCONTROL_RESP_START_JOB); -
branches/czw_branch/20100519/Ohana/src/photdbc/include/photdbc.h
r27435 r28338 52 52 double CHISQ_MAX; 53 53 double SIGMA_MAX; 54 double AVE_SIGMA_LIM; 54 55 int NMEAS_MIN; 55 56 double ZERO_POINT; -
branches/czw_branch/20100519/Ohana/src/photdbc/src/ConfigInit.c
r25757 r28338 42 42 43 43 ScanConfig (config, "SIGMA_MAX", "%lf", 0, &SIGMA_MAX); 44 ScanConfig (config, "AVE_SIGMA_LIM", "%lf", 0, &AVE_SIGMA_LIM); 44 45 ScanConfig (config, "NMEAS_MIN", "%d", 0, &NMEAS_MIN); 45 46 -
branches/czw_branch/20100519/Ohana/src/photdbc/src/copy_images.c
r28334 r28338 6 6 off_t Nimage; 7 7 char *ImageOut; 8 unsigned int imageID; 8 9 FITS_DB in; 9 10 FITS_DB out; … … 47 48 dvo_image_addrows (&out, image, Nimage); 48 49 50 // note that imageID is unsigned int 51 status = gfits_scan (&in.header, "IMAGEID", "%u", 1, &imageID); 52 if (!status) { 53 status = gfits_scan (&in.header, "NIMAGES", "%u", 1, &imageID); 54 imageID++; 55 } 56 status = gfits_modify (&out.header, "IMAGEID", "%u", 1, imageID); 57 49 58 dvo_image_update (&out, VERBOSE); 50 59 dvo_image_unlock (&out); -
branches/czw_branch/20100519/Ohana/src/photdbc/src/make_subcatalog.c
r28334 r28338 8 8 off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm, Nsecfilt; 9 9 double mag, minMag; 10 10 int keep; 11 11 12 Nsecfilt = GetPhotcodeNsecfilt (); 12 13 assert (catalog[0].Nsecfilt == Nsecfilt); … … 25 26 // exclude stars with too few measurements 26 27 if (NMEAS_MIN && (catalog[0].average[i].Nmeasure < NMEAS_MIN)) continue; 28 29 if (AVE_SIGMA_LIM) { 30 // if all of the average magnitude errors are >AVE_SIGMA_LIM, drop the object 31 keep = FALSE; 32 for (j = 0; !keep && (j < Nsecfilt); j++) { 33 if (catalog[0].secfilt[Nsecfilt*i+j].dM < AVE_SIGMA_LIM) { 34 keep = TRUE; 35 } 36 } 37 if (!keep) continue; 38 } 27 39 28 40 /* assign average and secfilt values */ -
branches/czw_branch/20100519/Ohana/src/photdbc/src/photdbc.c
r28334 r28338 21 21 skylist = SkyListByPatch (sky, -1, ®ION); 22 22 for (i = 0; i < skylist[0].Nregions; i++) { 23 if ( i % 100 == 0) fprintf (stderr, "%s\n", skylist[0].regions[i][0].name);23 if (VERBOSE) fprintf (stderr, "%s\n", skylist[0].regions[i][0].name); 24 24 25 25 // set the parameters which guide catalog open/load/create … … 56 56 } 57 57 58 // the output catalog needs to have the same values for 'objID' and 'sorted' as the input 59 outcatalog.objID = incatalog.objID; 60 outcatalog.sorted = incatalog.sorted; 61 if (!incatalog.sorted) { 62 fprintf (stderr, "ERROR: input db must be sorted: %s\n", incatalog.filename); 63 exit (2); 64 } 65 58 66 /* limit number of measures based on selections */ 59 67 make_subcatalog (&outcatalog, &incatalog);
Note:
See TracChangeset
for help on using the changeset viewer.
