Changeset 31669
- Timestamp:
- Jun 22, 2011, 12:45:03 AM (15 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 6 edited
-
configure.tcsh (modified) (2 diffs)
-
src/addstar/include/addstar.h (modified) (1 diff)
-
src/addstar/src/LoadData.c (modified) (1 diff)
-
src/addstar/src/args.c (modified) (5 diffs)
-
src/getstar/src/getstar.c (modified) (4 diffs)
-
src/getstar/src/select_by_region.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/configure.tcsh
r31160 r31669 203 203 set CPPFLAGS = "" 204 204 endif 205 if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror"206 if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY"205 if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror" 206 if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY" 207 207 208 208 if (! $?LDFLAGS) then … … 540 540 endif 541 541 set haveflag = `echo $f | tr '[:lower:]' '[:upper:]' | tr '.' '_'` 542 set CPPFLAGS = "$CPPFLAGS -DHAVE_$haveflag"542 set CPPFLAGS = "$CPPFLAGS -DHAVE_$haveflag" 543 543 end 544 544 -
trunk/Ohana/src/addstar/include/addstar.h
r31160 r31669 124 124 float ZPT_OBS_PHU; 125 125 float ZPT_ERR_PHU; 126 127 float OFFSET_ZPT; 126 128 127 129 int OLD_RESORT; -
trunk/Ohana/src/addstar/src/LoadData.c
r29001 r31669 89 89 CHECK_REALLOCATE (images[0], Image, NVALID, Nvalid, 10); 90 90 } 91 92 if (isfinite(OFFSET_ZPT)) { 93 for (i = 0; i < *Nstars; i++) { 94 stars[0][i].measure.M += OFFSET_ZPT; 95 stars[0][i].measure.Map += OFFSET_ZPT; 96 } 97 98 } 99 91 100 free (name); 92 101 *nvalid = Nvalid; -
trunk/Ohana/src/addstar/src/args.c
r29938 r31669 34 34 remove_argument (N, &argc, argv); 35 35 } 36 OLD_RESORT = FALSE; 37 if ((N = get_argument (argc, argv, "-old-resort"))) { 38 remove_argument (N, &argc, argv); 39 OLD_RESORT = TRUE; 40 } 36 41 37 if ((N = get_argument (argc, argv, "-fakeimage"))) { 42 38 options.mode = M_FAKEIMAGE; … … 47 43 remove_argument (N, &argc, argv); 48 44 FAKE_THETA = atof (argv[N]); 45 remove_argument (N, &argc, argv); 46 } 47 48 OFFSET_ZPT = NAN; 49 if ((N = get_argument (argc, argv, "-fakezpt"))) { 50 remove_argument (N, &argc, argv); 51 OFFSET_ZPT = atof (argv[N]); 49 52 remove_argument (N, &argc, argv); 50 53 } … … 392 395 fprintf (stderr, " -accept-motion : accept proper-motion data from reference\n"); 393 396 fprintf (stderr, " -accept-time : use TZERO supplied in header\n"); 397 fprintf (stderr, " -use-name : use the given name instead of the filename as the filename\n"); 394 398 fprintf (stderr, " -no-stars : skip the stars\n"); 395 399 fprintf (stderr, " -force : force read of database with inconsistent info\n"); 400 fprintf (stderr, " -threads (N) : use N threads for resort option\n"); 401 fprintf (stderr, " -fakezpt (offset) : apply an artificial offset to the magnitudes (for testing)\n"); 396 402 fprintf (stderr, " -textmode : force textmode for file (ignore header clues)\n"); 397 403 fprintf (stderr, " -v : verbose mode\n"); … … 399 405 fprintf (stderr, " -help : this list\n"); 400 406 fprintf (stderr, " -h : this list\n\n"); 407 401 408 exit (2); 402 409 } … … 417 424 418 425 **/ 419 -
trunk/Ohana/src/getstar/src/getstar.c
r26258 r31669 9 9 Catalog output; 10 10 FITS_DB db; 11 int code, Nsec, needMeas; 11 12 12 13 args (argc, argv); … … 17 18 18 19 SkyTableSetFilenames (sky, CATDIR, "cpt"); 20 21 code = photcode[0].code; 22 Nsec = GetPhotcodeNsec (code); 23 needMeas = (Nsec == -1); 19 24 20 25 // create an output catalog with the desired name and format options … … 58 63 catalog.filename = skylist[0].filename[i]; 59 64 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 60 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 65 catalog.catflags = LOAD_AVES | LOAD_SECF; 66 catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS; 61 67 62 68 // an error exit status here is a significant error … … 89 95 catalog.filename = skylist[0].filename[i]; 90 96 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 91 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 97 catalog.catflags = LOAD_AVES | LOAD_SECF; 98 catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS; 92 99 93 100 // an error exit status here is a significant error -
trunk/Ohana/src/getstar/src/select_by_region.c
r28241 r31669 4 4 int select_by_region (Catalog *output, Catalog *catalog, SkyRegion *region, int start, int end) { 5 5 6 int i, j, n,Nm, offset, m, Nsecfilt, code, Nsec;7 int Nave, NAVE, Nmeas, NMEAS ;6 int i, j, Nm, offset, m, Nsecfilt, code, Nsec; 7 int Nave, NAVE, Nmeas, NMEAS, needMeas; 8 8 double R, D, AREA; 9 9 float mag; … … 27 27 code = photcode[0].code; 28 28 Nsec = GetPhotcodeNsec (code); 29 needMeas = (Nsec == -1); 29 30 30 31 /* select the average objects in this region */ … … 67 68 68 69 for (i = 0; i < catalog[0].Naverage; i++) { 69 n = catalog[0].measure[i].averef;70 // n = catalog[0].measure[i].averef; 70 71 mag = NAN; 71 if (Nsec != -1) { 72 mag = catalog[0].secfilt[i*Nsecfilt + Nsec].M; 73 } else { 72 if (needMeas) { 74 73 offset = catalog[0].average[i].measureOffset; 75 74 for (m = 0; m < catalog[0].average[i].Nmeasure; m++) { … … 79 78 } 80 79 } 80 } else { 81 mag = catalog[0].secfilt[i*Nsecfilt + Nsec].M; 81 82 } 82 83 if (isnan(mag)) continue; … … 102 103 103 104 for (i = 0; i < catalog[0].Naverage; i++) { 104 n = catalog[0].measure[i].averef;105 // n = catalog[0].measure[i].averef; 105 106 106 107 R = catalog[0].average[i].R; … … 119 120 if (MagLimitUse) { 120 121 mag = NAN; 121 if (Nsec != -1) { 122 mag = catalog[0].secfilt[i*Nsecfilt + Nsec].M; 123 } else { 122 if (needMeas) { 124 123 offset = catalog[0].average[i].measureOffset; 125 124 for (m = 0; m < catalog[0].average[i].Nmeasure; m++) { … … 129 128 } 130 129 } 130 } else { 131 mag = catalog[0].secfilt[i*Nsecfilt + Nsec].M; 131 132 } 132 133 if (isnan(mag) || (mag > MagLimitValue)) continue; … … 142 143 offset = catalog[0].average[i].measureOffset; 143 144 144 for (j = 0; j < catalog[0].average[i].Nmeasure; j++) { 145 output[0].measure[Nmeas] = catalog[0].measure[offset + j]; 146 output[0].measure[Nmeas].averef = Nave; 147 Nmeas ++; 148 149 CHECK_REALLOCATE (output[0].measure, Measure, NMEAS, Nmeas, 1000); 145 if (needMeas) { 146 for (j = 0; j < catalog[0].average[i].Nmeasure; j++) { 147 output[0].measure[Nmeas] = catalog[0].measure[offset + j]; 148 output[0].measure[Nmeas].averef = Nave; 149 Nmeas ++; 150 CHECK_REALLOCATE (output[0].measure, Measure, NMEAS, Nmeas, 1000); 151 } 150 152 } 151 153
Note:
See TracChangeset
for help on using the changeset viewer.
