tropy.analysis_tools

tropy.analysis_tools.derived_variables

calc_lwp

Calculates the liquid water path.

tropy.analysis_tools.grid_and_interpolation

create_interpolation_index

Given georeference of two grids in lon and lat, an index is built to map a field on grid 1 to grid 2.

curve_flow_filter

Smoothing filter depending on isoline curvature.

cutout_cluster

Makes a cutout of a categorial field c for an object of class / number nc.

cutout_field4box

Cuts out a field based on center pix index and box size.

cutout_fields

Cuts out a field or a list of similar fields given row and column slices.

get_index

Given a point p the nearest grid point is returned.

i2iset

Returns an index set for a n-dim numpy array given an index i which points to a position within the same but flattened array.

interpolate_field_to_hor_pos

Given a sequence of points (or just one) a field (2d or 3d) given a grid is interpolated to the new positions.

ldiff

Calculates difference of a field at adjacent levels.

ll2xy

Transformation between longitude and latitude and local Cartesian coordinates in west-east direction (x) and south-north direction (y).

ll2xyc

Applies a centered version of ll2xy.

lmean

Calculates the layer mean of a field.

make_add_edge

Adds egde region to 2d data field.

make_index_set

This simple routine makes an 2d index set for given row and column number of a 2d field.

make_vert_cut

Makes a horizontal - vertical cut through a 3d field.

mid2edge_gridvector

Converts an mid-point based grid vector into an edge-based grid vector.

region2slice

Given a region of ((lon1,lon2),(lat1, lat2)) the routine provides a slicing ((row1, row2), (col1, col2)) than accomodates the region.

remap_field

Do nearest nearbor remapping on a simple equi-distant local cartesian coordiante grid.

simple_pixel_area

Approximates the grid box area of a lon - lat grid.

spline_smooting

Smoothes a curve with smooting spline.

tube_cutout4box

Performs tube cutout with given index set.

xy2ll

Transformation between local Cartesian coordinates in west-east direction (x) and south-north direction (y) and longitude and latitude.

tropy.analysis_tools.optical_flow

displacement_from_opt_flow

displacement_from_opt_flow_farneback

displacement_from_opt_flow_tvl1

displacement_vector

flow_velocity

Lagrangian_change

morph_trans_opt_flow

tropy.analysis_tools.segmentation

clustering

combine_object_stack

connected_sequences2pairlists

connectivity_clustering

markers_from_iterative_shrinking

multithreshold_clustering

percentiles_from_cluster

remove_clustersize_outside

remove_clustersize_outside_slow

remove_small_clusters

sequential_segmentation

set_connectivity_footprint

sort_clusters

watershed_clustering

watershed_merge_clustering

tropy.analysis_tools.statistics

autocorr

cond_perc_simple

correlation_bootstrap

crosscorr

cumsum_data_fraction

draw_from_empirical_1ddist

draw_from_empirical_dist

fdistrib_mapping

get_outlier_from_residuals

KStest

normalize_field

odrfit_with_outlier_removal

rank_transformation

tropy.analysis_tools.thermodynamic_variables

absolute_humidity

Calculates absolute humidity.

both_mass_fractions2mixing_ratios

Converts water and the vapor mass fraction to condensed water and vapor mixing ratio.

dew_point

Calculates dew point temperature after Markowski book p 13 eq (2.25)

dry_air_density

Calculates dry air density.

dry_air_potential_temperature

Calculates dry air potential temperature.

equivalent_potential_temperature

Calculates equivalent potential temperature.

H2r

Converts relative humidity H into mixing ratio r.

lifting_condensation_level_temperature

Calculates lifting condensation level temperature.

moist_gas_constant

Calculates gas constant of moist air.

moist_potential_temperature

Calculates moist air potential temperature.

moist_specific_heat

Calculates specific heat at constant pressure of moist air.

relative_humidity

Calculates relative humidity.

saturation_over_ice

Calculates saturation water vapor pressure over ice.

saturation_pressure

Calculates saturation water vapor pressure after Bolton (1980) MWR 108, p.1046, eq.

specific_humidity

Calculates specific humidity.

thermodynamic_constants

Sets some thermodynamic constants.

total_density

Calculates total density of moist air with hydrometeors.

watermass_fraction2rw

Converts water mass fraction to condensed water mixing ratio.

water_vapor_pressure

Calculates water vapor pressure.