00001
00002
00069 #ifndef OIFILTER_H
00070 #define OIFILTER_H
00071
00072 #include "oifile.h"
00073
00074 #if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)
00075 #define HAVE_G_OPTION_GROUP
00076 #endif
00077
00079 typedef struct {
00080
00081 char arrname[FLEN_VALUE];
00082 char insname[FLEN_VALUE];
00083 int target_id;
00084 double mjd_range[2];
00085 float wave_range[2];
00086 double bas_range[2];
00087 float snr_range[2];
00088 int accept_vis;
00089 int accept_vis2;
00090 int accept_t3amp;
00091 int accept_t3phi;
00092 int accept_flagged;
00093 } oi_filter_spec;
00094
00095
00096
00097
00098
00099 void init_oi_filter(oi_filter_spec *);
00100 const char *format_oi_filter(oi_filter_spec *);
00101 void print_oi_filter(oi_filter_spec *);
00102 void apply_oi_filter(const oi_fits *, const oi_filter_spec *, oi_fits *);
00103 #ifdef HAVE_G_OPTION_GROUP
00104 GOptionGroup *get_oi_filter_option_group(void);
00105 oi_filter_spec *get_user_oi_filter(void);
00106 void apply_user_oi_filter(const oi_fits *, oi_fits *);
00107 #endif
00108 void filter_oi_target(const oi_target *, const oi_filter_spec *, oi_target *);
00109 void filter_all_oi_array(const oi_fits *, const oi_filter_spec *, oi_fits *);
00110 GHashTable *filter_all_oi_wavelength(const oi_fits *, const oi_filter_spec *,
00111 oi_fits *);
00112 void filter_oi_wavelength(const oi_wavelength *, const float[2],
00113 oi_wavelength *, char *);
00114 void filter_all_oi_vis(const oi_fits *, const oi_filter_spec *, GHashTable *,
00115 oi_fits *);
00116 void filter_oi_vis(const oi_vis *, const oi_filter_spec *, const char *,
00117 oi_vis *);
00118 void filter_all_oi_vis2(const oi_fits *, const oi_filter_spec *, GHashTable *,
00119 oi_fits *);
00120 void filter_oi_vis2(const oi_vis2 *, const oi_filter_spec *, const char *,
00121 oi_vis2 *);
00122 void filter_all_oi_t3(const oi_fits *, const oi_filter_spec *, GHashTable *,
00123 oi_fits *);
00124 void filter_oi_t3(const oi_t3 *, const oi_filter_spec *, const char *,
00125 oi_t3 *);
00126
00127 #endif
00128