IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 23, 2004, 7:33:48 AM (22 years ago)
Author:
eugene
Message:

moved typename/modename funcs to libohana

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/detrend.c

    r2598 r2798  
    1212  double trange;
    1313  int TypeSelect, CCDSelect, FilterSelect;
    14   char *Filter, *Type;
    15   int type, mode, CCD;
     14  char *Filter;
     15  int Type, mode, CCD;
    1616  int NVALUE;
    1717  float *value;
     
    6666  if (N = get_argument (argc, argv, "-type")) {
    6767    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    }
    6973    remove_argument (N, &argc, argv);
    7074    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     }
    9075  }
    9176
     
    173158    if (FilterSelect && (strcasecmp (pimage[i].filter, Filter))) continue;
    174159    if (CCDSelect && (pimage[i].ccd != CCD)) continue;
    175     if (TypeSelect && (pimage[i].type != type)) continue;
     160    if (TypeSelect && (pimage[i].type != Type)) continue;
    176161
    177162    /* assign correct value */
Note: See TracChangeset for help on using the changeset viewer.