Changeset 4538
- Timestamp:
- Jul 12, 2005, 6:33:37 AM (21 years ago)
- Location:
- trunk/Ohana/src/addstar
- Files:
-
- 3 edited
-
include/addstar.h (modified) (1 diff)
-
src/args.c (modified) (2 diffs)
-
src/get2mass_as.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/include/addstar.h
r4299 r4538 102 102 int MODE; 103 103 char *DUMP; 104 char *SELECT_2MASS_QUALITY; 104 105 105 106 time_t TIMEREF; -
trunk/Ohana/src/addstar/src/args.c
r4299 r4538 156 156 remove_argument (N, &argc, argv); 157 157 } 158 /* define 2MASS quality flags to keep */ 159 SELECT_2MASS_QUALITY = NULL; 160 if ((N = get_argument (argc, argv, "-2massquality"))) { 161 remove_argument (N, &argc, argv); 162 SELECT_2MASS_QUALITY = strcreate (argv[N]); 163 remove_argument (N, &argc, argv); 164 } 158 165 159 166 /*** optional situations ***/ … … 189 196 } 190 197 198 191 199 if (argc != 2) { 192 200 fprintf (stderr, "USAGE: addstar (filename)\n"); -
trunk/Ohana/src/addstar/src/get2mass_as.c
r4299 r4538 16 16 17 17 int FilterSkip, TimeSkip, Np; 18 int i, Nstars, NSTARS, Nbyte, Nline, Nextra, code ;18 int i, Nstars, NSTARS, Nbyte, Nline, Nextra, code, Qentry; 19 19 Stars *stars; 20 20 gzFile gf; 21 char qc; 21 22 char *buffer, *filename; 22 23 char *p, *q, *ptr, *end, *tmp; … … 38 39 FilterSkip = 6; 39 40 TimeSkip = 23; 41 Qentry = 0; 40 42 } 41 43 if (thiscode[0].code == TM_H) { 42 44 FilterSkip = 10; 43 45 TimeSkip = 19; 46 Qentry = 1; 44 47 } 45 48 if (thiscode[0].code == TM_K) { 46 49 FilterSkip = 14; 47 50 TimeSkip = 15; 51 Qentry = 2; 48 52 } 49 53 if (!FilterSkip) Shutdown ("invalid photcode %d", thiscode[0].code); … … 76 80 if (DEC > 90) Shutdown ("weird DEC value: something is wrong"); 77 81 78 /* this test is now wrong*/82 /* skip stars which are outside desired region */ 79 83 if (DEC > DEC1) goto skip_star; 80 84 if (DEC < DEC0) goto skip_star; … … 88 92 dM = strtod (ptr, NULL); 89 93 time = get2mass_time (ptr, buffer, TimeSkip, Nbyte); 94 95 /* filter on the ph_qual flag for this filter (field 19) */ 96 if (SELECT_2MASS_QUALITY != NULL) { 97 ptr = skipNbounds (p, '|', 18, Nbyte - (p - buffer)); 98 qc = ptr[Qentry]; 99 if (strchr (SELECT_2MASS_QUALITY, qc) == NULL) goto skip_star; 100 } 90 101 91 102 stars[Nstars].R = RA;
Note:
See TracChangeset
for help on using the changeset viewer.
