API Reference#

Survey object#

Object-oriented wrapper around the functional API, storing a survey dataframe, its column names, metadata, and intersection table.

Survey(data, *[, line_column, ...])

Container for an airborne survey dataframe with its structural column names, coordinate reference system, metadata, intersection table, and lazily computed summary statistics.

Trajectories#

Functions for calculating trajectory or navigation related fields

along_track_distance(data, *[, ...])

Calculate the distances along track in meters.

relative_distance(data, *[, groupby_column, ...])

Calculate distance between successive points in a dataframe.

ground_speed(data, *, time_column[, ...])

TODO: do calculation forward for 1st points so they aren't 0 Calculate the ground speed in meters per second.

directional_velocity(data, *[, time_column, ...])

Calculate one component of velocity, which is the change in coordinate values divided by the change in time between each successive row in the dataframe.

vertical_acceleration(data, *, time_column, ...)

Calculate the 2nd derivative of height change with respect to time for each line.

track(data, *, latitude_column, longitude_column)

Calculate the track between each successive row in a dataframe.

Geospatial data operations#

Functions for performing geospatial operations.

reproject(x, y, input_crs, output_crs)

Convert coordinates from input CRS to output CRS.

block_reduce(data, reduction, *, spacing, ...)

Reduce data by line based on the column(s) provided by reduce_by and the reduction function.

filter_line(data, *, filter_width, ...[, ...])

Apply a 1D filter to a column of a pandas DataFrame along values of another column.

filter_grid(grid[, filter_width, ...])

Apply a spatial filter to a grid.

sample_grid(grid, x, y[, interpolation])

Sample a grid's values at a set of x, y point coordinates.

resample(data, *, spacing, resample_by, maxdist)

Resample all numeric columns in a dataframe at a supplied spacing of the supplied resample_by column.

resample_as(data, *, resample_by, ...[, ...])

interpolate_missing(data, *, to_interp, ...)

Interpolate NaN's in a dataframe's "to_interp" column, based on values from the "interp_on" column.

interpolate_missing_pointwise(data, *, ...)

Interpolate NaN's in the "to_interp" column, based on values from "interp_on".

interpolate_missing_pointwise_with_windows(...)

Interpolate NaN's in the "to_interp" column, based on values from "interp_on" using only values within a window around the NaN.

optimal_spline_damping(coordinates, data[, ...])

Find the best damping parameter for a verde.SplineCV() fit.

trend(data_to_fit, cols_to_fit, ...[, ...])

Fit a polynomial trend using scikit-learn and predict values at new locations.

Organizing survey data#

Functions for working with and organizing survey data.

split_into_segments(data, threshold, column_name)

Split dataframe into segments where there is a gap in the supplied values greater than the threshold.

unique_line_id(df, line_col_name)

Convert supplied lines names into integers.

median_line_spacing(data, line_column)

Estimate the flight line spacing by first, for each point on a specific line, finding the distances to the nearest point on another line and repeating this for all lines.

largest_line_dimensions(data, line_column)

Largest dimension of each line, taken as the longest side of its minimum rotated (oriented) bounding box.

Quality Control (QC)#

Functions for automated and manual quality control of airborne geophysical survey data.

inspect_lines(df, *, plot_variable, interp_on)

Cross-over analysis#

Functions for finding and examining cross-overs

create_intersection_table(data, *, ...[, ...])

Create a dataframe which contains the intersections between all combinations of lines.

interpolate_intersections(df, intersections, ...)

_summary_

add_values_to_intersections(df, ...)

inspect_intersections(data, *, x, ...[, ...])

plot_line_and_crosses(df, *, y, line_column, x)

plot lines and crosses

lines_without_intersections(data, ...)

calculate_crossover_errors(data, ...[, ...])

Calculate mistie values for all intersections.

update_intersections_with_eq_sources(data, ...)

At each theoretical intersection point, replace the interpolated field value with a value predicted by the fitted equivalent sources for the line, at the x,y coordinate of the intersection point, and the higher of the two lines' elevations.

calculate_intersection_weights(gdf, inters, ...)

Calculate weights for each intersection based on various criteria.

Levelling#

Functions for levelling airborne geophysical survey data.

level_to_grid(data, *, data_column, ...[, ...])

Level flight lines based on the misfit between the data_column and grid_column values.

crossover_pair_levelling(data, inters, *, ...)

Level lines by fitting a trend of specified order to cross-over errors and apply the correction to the data_col column.

crossover_network_levelling(data, inters, *, ...)

Level a network of lines by fitting a trend (or low-pass filter) to the cross-over errors at every intersection each line participates in, whether it appears as line1 or line2 in the intersection table (i.e. method='network' from create_intersection_table).

alternating_iterative_line_levelling(data, ...)

equivalent_source_levelling(data, *, ...[, ...])

Iteratively levelling lines by comparing the line to the forward calculated effect of equivalent sources which have been fitted to nearby data from other lines.

plot_levelling_convergence(results, *[, ...])

Plotting functions#

Most of these are also available as Survey methods (e.g. survey.plot(), survey.plotly_points()), which fill in the survey’s dataframe and column names automatically.

plotly_points(df, *[, color_col, color, ...])

Create a scatterplot of spatial data using columns 'easting' and 'northing'.

plotly_profiles(data, *, y, x[, y_axes, ...])

plot data profiles with plotly currently only allows 3 separate y axes, set with "y_axes", starting with 1

plot_profiles(data, *, y, x[, y_axes, ...])

plot data profiles with matplotlib currently only allows 3 separate y axes, set with "y_axes", starting with 1

plot_line_and_crosses(df, *, y, line_column, x)

plot lines and crosses

inspect_lines(df, *, plot_variable, interp_on)

add_scalebar(ax, scale_length[, position])

nice_scalebar_width(map_width[, target_fraction])

Round a fraction of the map width to a human-friendly scalebar length.

choose_colormap(data[, robust])

Choose an appropriate colormap and color limits for a set of values.

Utilities#

get_min_max(values[, robust, absolute, ...])

Get a grids max and min values.

rmse(data[, as_median])

function to give the root mean/median squared error (RMSE) of data

normalize_values(x[, low, high, quantiles])

Normalize a list of numbers by scaling the min and max values to be between low and high.