Changeset 2798 for trunk/Ohana/src/opihi/dvo/detrend.c
- Timestamp:
- Dec 23, 2004, 7:33:48 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/detrend.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/detrend.c
r2598 r2798 12 12 double trange; 13 13 int TypeSelect, CCDSelect, FilterSelect; 14 char *Filter , *Type;15 int type, mode, CCD;14 char *Filter; 15 int Type, mode, CCD; 16 16 int NVALUE; 17 17 float *value; … … 66 66 if (N = get_argument (argc, argv, "-type")) { 67 67 remove_argument (N, &argc, argv); 68 Type = strcreate (argv[N]); 68 Type = get_image_type (argv[N]); 69 if (Type == T_UNDEF) { 70 fprintf (stderr, "ERROR: invalid image type %s\n", argv[N]); 71 return (FALSE); 72 } 69 73 remove_argument (N, &argc, argv); 70 74 TypeSelect = TRUE; 71 }72 type = TYPE_NONE;73 if (TypeSelect) {74 if (!strncasecmp (Type, "obj", 3)) {75 type = TYPE_OBJECT;76 }77 if (!strncasecmp (Type, "bias", 4)) {78 type = TYPE_BIAS;79 }80 if (!strncasecmp (Type, "dark", 4)) {81 type = TYPE_DARK;82 }83 if (!strncasecmp (Type, "flat", 4)) {84 type = TYPE_FLAT;85 }86 if (type == TYPE_NONE) {87 fprintf (stderr, "invalid image type %s\n", Type);88 return (FALSE);89 }90 75 } 91 76 … … 173 158 if (FilterSelect && (strcasecmp (pimage[i].filter, Filter))) continue; 174 159 if (CCDSelect && (pimage[i].ccd != CCD)) continue; 175 if (TypeSelect && (pimage[i].type != type)) continue;160 if (TypeSelect && (pimage[i].type != Type)) continue; 176 161 177 162 /* assign correct value */
Note:
See TracChangeset
for help on using the changeset viewer.
