#include <iostream>#include <vector>#include <assert.h>#include <boost/geometry.hpp>#include <boost/geometry/geometries/point.hpp>#include <boost/geometry/geometries/box.hpp>#include <boost/geometry/index/rtree.hpp>#include <boost/numeric/ublas/matrix.hpp>Go to the source code of this file.
Classes | |
| class | titanlib::Dataset |
| Represents point and their observed values. More... | |
| struct | titanlib::KDTree::is_not_equal |
| class | titanlib::KDTree |
| class | titanlib::not_implemented_exception |
| class | titanlib::Point |
| class | titanlib::Points |
| struct | titanlib::sort_pair_first< T1, T2 > |
| struct | titanlib::KDTree::within_radius |
Namespaces | |
| titanlib | |
Macros | |
| #define | __version__ TITANLIB_VERSION |
| #define | TITANLIB_VERSION "0.3.3" |
Typedefs | |
Short-hand notation for vectors of different dimensions sizes | |
| typedef std::vector< int > | titanlib::ivec |
| typedef std::vector< float > | titanlib::vec |
| typedef std::vector< double > | titanlib::dvec |
| typedef std::vector< vec > | titanlib::vec2 |
Enumerations | |
| enum | titanlib::BackgroundType { titanlib::VerticalProfile = 0, titanlib::VerticalProfileTheilSen = 1, titanlib::MeanOuterCircle = 2, titanlib::MedianOuterCircle = 3, titanlib::External = 4 } |
| enum | titanlib::ConditionType { titanlib::Eq = 0, titanlib::Gt = 1, titanlib::Geq = 2, titanlib::Lt = 3, titanlib::Leq = 4 } |
| enum | titanlib::CoordinateType { titanlib::Geodetic = 0, titanlib::Cartesian = 1 } |
| Types of coordinates for position of points. More... | |
Functions | |
Spatial checks | |
Checks that consider the spatial properties of observations | |
| ivec | titanlib::sct (const Points &points, const vec &values, int num_min, int num_max, float inner_radius, float outer_radius, int num_iterations, int num_min_prof, float min_elev_diff, float min_horizontal_scale, float vertical_scale, const vec &pos, const vec &neg, const vec &eps2, vec &prob_gross_error, vec &rep, const ivec &obs_to_check=ivec()) |
| Spatial Consistency Test. More... | |
| ivec | titanlib::sct_resistant (const Points &points, const vec &values, const ivec &obs_to_check, const vec &background_values, BackgroundType background_elab_type, int num_min_outer, int num_max_outer, float inner_radius, float outer_radius, int num_iterations, int num_min_prof, float min_elev_diff, float min_horizontal_scale, float max_horizontal_scale, int kth_closest_obs_horizontal_scale, float vertical_scale, const vec &value_mina, const vec &value_maxa, const vec &value_minv, const vec &value_maxv, const vec &eps2, const vec &tpos, const vec &tneg, bool debug, bool basic, vec &scores) |
| Spatial Consistency Test (SCT) - resistant to outliers. More... | |
| ivec | titanlib::sct_dual (const Points &points, const vec &values, const ivec &obs_to_check, const vec &event_thresholds, ConditionType condition, int num_min_outer, int num_max_outer, float inner_radius, float outer_radius, int num_iterations, float min_horizontal_scale, float max_horizontal_scale, int kth_closest_obs_horizontal_scale, float vertical_scale, const vec &test_thresholds, bool debug) |
| Spatial Consistency Test for dichotomous (yes/no) variables. More... | |
| ivec | titanlib::fgt (const Points &points, const vec &values, const ivec &obs_to_check, const vec &background_values, const vec &background_uncertainties, BackgroundType background_elab_type, int num_min_outer, int num_max_outer, float inner_radius, float outer_radius, int num_iterations, int num_min_prof, float min_elev_diff, const vec &value_mina, const vec &value_maxa, const vec &value_minv, const vec &value_maxv, const vec &tpos, const vec &tneg, bool debug, bool basic, vec &scores) |
| First Guess Test (FGT) - simplified (without OI) SCT. More... | |
| ivec | titanlib::range_check (const vec &values, const vec &min, const vec &max) |
| Range check. More... | |
| ivec | titanlib::range_check_climatology (const Points &points, const vec &values, int unixtime, const vec &pos, const vec &neg) |
| ivec | titanlib::buddy_check (const Points &points, const vec &values, const vec &radius, const ivec &num_min, float threshold, float max_elev_diff, float elev_gradient, float min_std, int num_iterations, const ivec &obs_to_check=ivec()) |
| Buddy check. More... | |
| ivec | titanlib::buddy_event_check (const Points &points, const vec &values, const vec &radius, const ivec &num_min, float event_threshold, float threshold, float max_elev_diff, float elev_gradient, int num_iterations, const ivec &obs_to_check=ivec()) |
| ivec | titanlib::isolation_check (const Points &points, int num_min, float radius, float vertical_radius=MV) |
| Isolation check. More... | |
| ivec | titanlib::isolation_check (const Points &points, const ivec &num_min, const vec &radius, const vec &vertical_radius=vec()) |
| Isolation check, vectorized version. More... | |
| ivec | titanlib::duplicate_check (const Points &points, float radius, float vertical_range=titanlib::MV) |
| Duplicate check. More... | |
| ivec | titanlib::metadata_check (const Points &points, bool check_lat=true, bool check_lon=true, bool check_elev=true, bool check_laf=true) |
Timeserie methods | |
Functions that operate on timeseries of observations | |
| vec | titanlib::lag_reduction_filter (const vec ×, const vec &values, float a=0.5, float b=0.5, float k1=0.25, float k2=0.25, int n=10) |
| Method by McCarthy 1973 https://doi.org/10.1175/1520-0450(1973)012%3C0211:AMFCAT%3E2.0.CO;2. More... | |
OpenMP settings | |
Functions that configure OpenMP | |
| void | titanlib::set_omp_threads (int num) |
| Set the number of OpenMP threads to use. More... | |
| int | titanlib::get_omp_threads () |
| Get the number of OpenMP threads currently set. More... | |
| void | titanlib::initialize_omp () |
| Sets the number of OpenMP threads to 1 if OMP_NUM_THREADS undefined. More... | |
Utilities | |
Helper functions | |
| std::string | titanlib::version () |
| double | titanlib::clock () |
| bool | titanlib::is_valid (float value) |
| vec | titanlib::compute_vertical_profile (const vec &elevs, const vec &oelevs, const vec &values, int num_min_prof, double min_elev_diff, bool debug=false) |
| Compute a vertical profile based on input data. More... | |
| vec | titanlib::compute_vertical_profile_Theil_Sen (const vec &elevs, const vec &oelevs, const vec &values, int num_min_prof, double min_elev_diff, bool debug) |
| bool | titanlib::convert_coordinates (const vec &lats, const vec &lons, vec &x_coords, vec &y_coords, vec &z_coords) |
| Convert lat/lons to 3D cartesian coordinates with the centre of the earth as the origin. More... | |
| bool | titanlib::convert_coordinates (float lat, float lon, float &x_coord, float &y_coord, float &z_coord) |
| Same as above, but convert a single lat/lon to 3D cartesian coordinates. More... | |
| vec | titanlib::interpolate_to_points (const vec2 &input_lats, const vec2 &input_lons, const vec2 &input_values, const vec &output_lats, const vec &output_lons) |
| float | titanlib::deg2rad (float deg) |
| float | titanlib::calc_distance (float lat1, float lon1, float lat2, float lon2) |
| float | titanlib::calc_distance (float x0, float y0, float z0, float x1, float y1, float z1) |
| float | titanlib::compute_quantile (double quantile, const vec &array) |
| float | titanlib::find_k_closest (const vec &array, int k) |
| template<class T > | |
| T | titanlib::subset (const T &array, const ivec &indices) |
| Points | titanlib::subset (const Points &input, const ivec &indices) |
| template<class T > | |
| void | titanlib::unsubset (const T &array, T &orig_array, const ivec &indices) |
| vec | titanlib::background (const vec &elevs, const vec &values, int num_min_prof, float min_elev_diff, float value_minp, float value_maxp, BackgroundType background_type, const vec &external_background_values, const ivec &indices_global_outer, bool debug) |
| Background (first guess) calculations at observation locations. More... | |
| bool | titanlib::invert_matrix (const boost::numeric::ublas::matrix< float > &input, boost::numeric::ublas::matrix< float > &inverse) |
| bool | titanlib::set_indices (const ivec &indices_global_outer_guess, const ivec &obs_test, const ivec &dqcflags, const vec &dist_outer_guess, float inner_radius, int test_just_this, ivec &indices_global_outer, ivec &indices_global_test, ivec &indices_outer_inner, ivec &indices_outer_test, ivec &indices_inner_test) |
SWIG testing functions | |
Functions for testing the SWIG interface. Not useful for any other purpose. | |
| float * | titanlib::test_array (float *v, int n) |
| Required for SWIG only. More... | |
| void | titanlib::test_not_implemented_exception () |
Variables | |
Constants | |
Functions that assimilate observations onto a gridded background | |
| static const float | titanlib::MV = NAN |
| Missing value indicator. More... | |
| static const float | titanlib::MV_CML = -999 |
| Missing value indicator in gridpp command-line tool. More... | |
| static const float | titanlib::pi = 3.14159265 |
| Mathematical constant pi. More... | |
| static const double | titanlib::radius_earth = 6.378137e6 |
| Radius of the earth [m]. More... | |
| #define __version__ TITANLIB_VERSION |
| #define TITANLIB_VERSION "0.3.3" |
1.8.13