Skip to content

Function index

Every public class, method and function, grouped by module. Each name links to its full entry: parameters with units and defaults, return values, exceptions, and notes on accuracy where the method has been benchmarked.

Conventions used throughout:

  • Lengths are metres, areas m², volumes m³, densities m² m⁻³ (area) or m³ m⁻³ (wood volume). Angles are degrees unless a parameter says radians.
  • Point arrays are (N, 3) float64. Voxel arrays are (nz, ny, nx), and grid shape properties are (nx, ny, nz).
  • Functions return new objects and never modify their inputs. The exceptions are GapProfile.add_scan, RayVoxelGrid.add_wood_volume and trees.tree_heights, which say so.
  • Anything random takes a seed, so a run can be repeated exactly.
  • Errors: bad files raise OSError, bad arguments raise ValueError, and missing attributes raise KeyError or ValueError with the attribute's name.

sylva.pointcloud

Name Kind Summary
PointCloud class A set of 3D points with optional per-point attributes.
PointCloud.x property x coordinates, a view into xyz (length N).
PointCloud.y property y coordinates, a view into xyz (length N).
PointCloud.z property z coordinates, a view into xyz (length N).
PointCloud.bounds property Axis-aligned bounding box as (min_xyz, max_xyz), two length-3 arrays.
PointCloud.heights method Height above ground for each point.
PointCloud.copy method Deep copy.
PointCloud.with_attrs method Add or replace attributes.
PointCloud.without method Drop attributes.
PointCloud.where method Points satisfying an attribute expression.
PointCloud.transform method Apply a rigid or affine transform.
PointCloud.translate method Shift every point by a constant offset.
PointCloud.rotate method Rotate every point about an axis.
PointCloud.recentre method Move the coordinates close to zero.
PointCloud.concatenate method Stack several clouds into one.
PointCloud.from_array method Build a cloud from a 2D array.

sylva.raster

Name Kind Summary
Raster class A regular 2D grid in map coordinates, used for DTMs and CHMs.
Raster.shape property (rows, cols) of data.
Raster.xmax property Eastern edge of the grid.
Raster.ymax property Northern edge of the grid.
Raster.cell_centers method Cell-centre coordinates.
Raster.cell_index method Cell containing each coordinate.
Raster.sample method Interpolate the grid at arbitrary coordinates.
Raster.fill_nearest method Fill NaN cells from the nearest valid cell.
Raster.to_geotiff method Write a single-band float32 GeoTIFF, north-up, nodata = NaN.
Raster.to_ascii_grid method Write an ESRI ASCII grid (.asc), north-up, with its CRS in a .prj beside it.
Raster.from_ascii_grid method Read an ESRI ASCII grid written by to_ascii_grid or GIS software.

sylva.io

Name Kind Summary
read function Read a point cloud, choosing the reader from the file extension.
write function Write a point cloud, choosing the writer from the file extension.
read_ascii function Read a delimited text point cloud.
read_rxp function Read a RIEGL .rxp scan as points, converted like RiSCAN PRO.
read_rxp_shots function Read a RIEGL .rxp scan as pulses.
find_rivlib_shim function Locate libsylva_rivlib, Sylva's shim over RiVLib's C++ class.
find_rivlib function Locate RiVLib's libscanifc shared library.
read_rdbx function Read a RIEGL .rdbx database (RDB 2) as points.
RdbxAttribute class One point attribute of an .rdbx database, as the database describes it.
RdbxInfo class What an .rdbx database holds besides its points, see rdbx_info.
RdbxInfo.json method A metadata entry parsed as JSON (RIEGL's entries all are).
rdbx_info function Describe an .rdbx database without reading its points.
find_rdblib function Locate RIEGL's librdb shared library (the RDB SDK).
read_matrix_file function Read a 4x4 transform stored as 16 whitespace-separated numbers.

sylva.shots

Name Kind Summary
Shots class Laser pulses, each with zero or more echoes.
Shots.n_shots property Number of pulses, including misses.
Shots.n_echoes property Number of echoes over all pulses.
Shots.shot_of_echo method Index of the owning shot for each echo.
Shots.echo_rank method Position of each echo within its shot.
Shots.echo_xyz method Echo positions in the shots' frame.
Shots.to_pointcloud method The echoes as a point cloud; misses are dropped.
Shots.transform method Move the pulses into another frame (e.g. scanner to project with the SOP).
Shots.subset method Select pulses.
Shots.zenith_azimuth method Beam angles of each pulse.
Shots.concatenate method Stack pulse sets, e.g. several scan positions.
Shots.pulses_per_line method Effective number of pulses fired along each zenith line.
Shots.expected_per_zenith method Number of pulses the scan pattern fired into each zenith ring.
Shots.fill_missing method Add the pulses that returned nothing.
Shots.save method Write the sylva shots format: a Parquet file with one row per pulse.
Shots.load method Read a shots file written by save.
Shots.file_info method Describe a shots file without reading its pulses.
Shots.from_pointcloud method Pulses from a single-position point cloud.
Shots.from_ray_cloud method From a raycloudtools ray cloud. nx, ny, nz (PLY) or sx, sy, sz (LAS/LAZ) point from each end point back to the sensor; bound == 0 (else alpha == 0) marks unbounded rays, which become echo-less shots. Returns sharing a beam_id / gps_time are joined into one multi-echo shot when number_of_returns is present.

sylva.riscan

Name Kind Summary
ScanPosition class One scan position of a RiSCAN project.
ScanPosition.levelling property (4, 4) rotation that levels this scan (from attitude), or None.
ScanPosition.origin property Scanner position in project coordinates (the SOP translation), or None.
ScanPosition.reflectors method The targets the scanner found here (tiepoints), in its own frame.
ScanPosition.transform method Scanner-to-project (or scanner-to-global) transform.
ScanPosition.read method Read the scan as points in project (or global) coordinates.
ScanPosition.read_shots method Read the scan as pulses in project (or global) coordinates.
RiscanProject class A parsed RiSCAN PRO project; build with read_riscan_project.
RiscanProject.names property Position names, in project order.
RiscanProject.with_scans method Positions that have a scan.
RiscanProject.gnss_positions method Scanner GNSS fixes in local metres (see gnss_to_local).
RiscanProject.origins method Scanner positions in project coordinates.
gnss_to_local function GNSS fixes as local metres about the survey's own centre.
read_riscan_project function Parse a RiSCAN PRO project directory.
read_export_settings function Read a RiSCAN PRO export filter settings file.
export_settings_mask function Keep-mask of points within every interval of settings, as RiSCAN's export filter.
angular_steps function The scan pattern's angular increments (degrees), estimated from the points.
riscan_like_mask function What RiSCAN PRO's RXP import keeps, approximately, as a keep-mask.

sylva.filters

Name Kind Summary
voxel_downsample function Thin a cloud to at most one point per cubic voxel.
random_subsample function Random subsample without replacement.
min_distance_subsample function Thin to an even spacing: no two kept points closer than distance.
crop_box function Keep points inside an axis-aligned box (bounds inclusive).
crop_cylinder function Keep points inside a vertical cylinder, e.g. a circular plot.
range_filter function Keep points by 3D distance from a scanner.
statistical_outlier_removal function Remove isolated points by their distance to neighbours (Rusu et al. 2008).
radius_outlier_removal function Remove points with too few neighbours within a fixed radius.
estimate_normals function Surface normals from local principal components.
planarity_linearity function Local shape descriptors from neighbourhood eigenvalues.
euclidean_clusters function Group points into clusters joined by chains of close points.
knn function k nearest neighbours of query points (kd-tree).

sylva.ground

Name Kind Summary
classify_ground_csf function Classify ground with the Cloth Simulation Filter (Zhang et al. 2016).
classify_ground_pmf function Classify ground with the Progressive Morphological Filter (Zhang et al. 2003).
ground_mask function Which points are ground.
make_dtm function Digital terrain model from the ground points.
normalize_height function Add height above ground as an attribute.
flatten function Replace z with height above ground.
make_chm function Canopy height model: the highest point in each cell.

sylva.registration

Name Kind Summary
kabsch function Best rigid transform between paired points (Kabsch 1976; Umeyama 1991, no scale).
icp function Iterative closest point.
estimate_normals function PCA normals; the same as sylva.filters.estimate_normals.
merge_scans function Put several scans in one frame and merge them.
rotation_z function Rotation about the z axis.
translation function Translation matrix.

sylva.coreg

Name Kind Summary
ICPConfig class Settings of icp.
ICPConfig.distances method Correspondence cut-off of each level.
ICPResult class Outcome of icp; transform maps source into target, initial guess included.
PlaneInformation class How well point-to-plane correspondences pin a transform.
ICPTarget class A target's ICP pyramid, built once and reused.
icp function Align source onto target.
plane_information function Point-to-plane information of a transform, as at the end of icp.
evaluate_registration function Score a registration without changing it.
Stem class A detected stem.
Stem.quality property 0-1 confidence from the fit residual, the arc seen and the slices linked.
StemMap class The stems of one scan.
StemMap.positions property (n, 3) stem positions at the reference height.
StemMap.sorted_by_quality method Best first (numpy's default sort, so ties always fall the same way).
StemMap.top method The n best stems; matching cost is quadratic in the count.
StemMap.transformed method Every stem position and axis moved by a rigid transform.
StemMap.save method Write the stems as JSON.
StemMap.load method Read stems written by save.
StemDetectionConfig class Settings of detect_stems.
detect_stems function Detect the stems of one scan.
stem_map_from_arrays function A stem map from plain arrays (tests and external stem lists).
Tree class A leaning, tapering stem carrying a crown.
Tree.radius_at method Stem radius at height h above the base.
Tree.axis_point method Axis position at height h above the base.
Plot class A plot on an analytic terrain surface.
Plot.terrain method Terrain elevation at (n, 2) locations.
Plot.stem_positions property True stem axis positions 1.3 m above the base.
simulate_plot function A plot of n_trees on undulating terrain.
scan_plot function A virtual scan of plot from scanner_xy.
Survey class Simulated scans, each in its own scanner frame, with their true poses.
Survey.overlap_stems method Trees detectable in both scans: an upper bound on matches.
simulate_survey function A multi-scan survey of one plot.
identity function The 4x4 identity transform.
skew function The 3x3 skew-symmetric matrix of a 3-vector.
so3_exp function Rotation matrix of a rotation vector.
so3_log function Rotation vector of a rotation matrix.
se3_exp function Transform of a twist [w, t].
se3_log function Twist [w, t] of a transform; the inverse of se3_exp.
invert function Inverse of a rigid transform.
transform_points function Apply a transform to (n, 3) points.
transform_vectors function Rotate (n, 3) directions (the translation is ignored).
yaw_transform function A rotation of yaw radians about +z followed by a translation.
kabsch function Least-squares rigid transform mapping source onto target.
kabsch_2d_yaw function Least-squares yaw and translation (4 degrees of freedom) between point sets.
rotation_angle function Rotation magnitude of a transform, in radians (exact near zero).
transform_difference function (rotation_rad, translation_m) of the discrepancy A^-1 B.
default_information function Diagonal information matrix from registration quality.
adjoint function (6, 6) adjoint of a transform on [omega, v] twists: T @ se3_exp(xi) @ invert(T) == se3_exp(adjoint(T) @ xi).
plane_edge_information function Edge information from the point-to-plane correspondences of an ICP.
PoseGraphEdge class A measured relative transform.
PoseGraphEdge.weight property Scalar trust of the edge, for the spanning-tree initialisation.
OptimisationResult class Diagnostics of PoseGraph.optimise.
PoseGraph class A pose graph over scan poses.
PoseGraph.add_edge method Add a measurement that scan i maps into scan j by transform.
PoseGraph.components method Connected components, as sorted lists of nodes.
PoseGraph.initialise method Initialise the poses by walking a maximum-weight spanning tree.
PoseGraph.residual method 6-vector error of one edge under poses (default: the current ones).
PoseGraph.total_error method Sum of squared Mahalanobis edge errors over edges (default: all).
PoseGraph.optimise method Levenberg-Marquardt over all edges, with outlier rejection.
PoseGraph.relative method Optimised transform mapping scan i into scan j's frame.
GroundModel class A raster terrain model with bilinear interpolation.
GroundModel.height_at method Terrain height at (n, 2) locations (clamped at the edges).
GroundModel.support method Were (n, 2) locations backed by ground returns?
GroundModel.normalise method Heights above ground of (n, 3) points.
GroundModel.slope_deg property Mean terrain slope (degrees), a sanity check on the fit.
fit_ground function Fit a raster terrain model to a point cloud.
JointRefinement class Result of refine_joint: the poses and how far each moved.
refine_joint function Solve all poses together from point-to-plane and stem correspondences.
Reflector class One retro-reflective target, in the scan's own frame.
read_tiepoint_list function Read a RIEGL .tpl tie-point list (JSON).
read_reflector_list function Read a RiSCAN PRO .rfl reflector list (RieglRflID).
detect_reflectors function Find retro-reflective targets in a scan by their return strength.
ReflectorMatch class Alignment of two target sets; transform maps source into target.
match_reflectors function Align two target sets with no initial guess.
MatchConfig class Settings of match_stem_maps.
MatchResult class Outcome of match_stem_maps; transform maps source into target.
MatchResult.inlier_fraction property Inliers over the smaller stem map.
match_stem_maps function Yaw and translation aligning source stems onto target stems, with no initial guess.
voxel_downsample function One point per voxel.
estimate_normals function Unit normals and planarity by local PCA.
planar_filter function Keep the locally planar points: stems, ground and logs.
KdTree class Nearest-neighbour search over a fixed set of 2-D or 3-D points.
KdTree.query method Nearest point to each query.
reading_options function RXP reading options from a RiSCAN PRO export settings file and explicit bounds.
prepare_scan function Fit the ground, detect stems and build the ICP subsample of one scan.
CoregConfig class Settings of the whole pipeline.
CoregConfig.to_dict method The whole configuration as plain data.
ScanFeatures class Everything later stages need from one scan; build with prepare_scan.
ScanFeatures.usable property Can the scan take part in registration at all?
ScanFeatures.location method Where the scanner stood in the world, given this scan's world_from_scan.
PairResult class Registration of one pair; transform maps scan i into scan j.
PairResult.stem_rmse property Stem agreement of the transform this pair reports.
PairResult.summary method One line for the report.
SurveyResult class Outcome of coregistering a survey.
SurveyResult.transform_for method world_from_scan of one scan, applying directly to its raw points.
SurveyResult.pair_for_edge method The pair behind a pose-graph edge.
SurveyResult.rejected_pairs method Accepted pairs the global solve found inconsistent with the rest.
SurveyResult.consistency method Horizontal stem disagreement per accepted pair under the final poses (m).
SurveyResult.report method Plain-text summary for a log or a QC record.
SurveyResult.save method Write the transforms and quality as JSON (transforms.json).
load_transforms function Read the world_from_scan of every registered scan from SurveyResult.save.
register_pair function Coarse-match then ICP-refine one pair of prepared scans.
coregister function Coregister a whole survey.
coregister_prepared function Pairwise registration and the global solve on prepared scans.
place_from_prior function Place one scan from an approximate pose instead of from stems.
merge_clouds function Every scan moved into the reference frame and concatenated.

sylva.trees

Name Kind Summary
Tree class A detected tree and its stem fit.
Tree.as_dict method Flat dict of every field, with extra merged in; one row of a tree table.
fit_circle function Least-squares circle through 2D points.
fit_circle_ransac function Circle fit that tolerates outliers (twigs, noise, a second stem).
detect_stems function Detect stems in a height-normalised cloud by linking circles across slices.
prune_trees function Drop short candidates and merge duplicates after segmentation.
basal_area function Basal area of a plot (m²/ha): the stems' cross-sections at breast height.
dbh_profile function Stem diameter at a series of heights (a taper curve).
segment_trees function Assign each point to a stem by least-cost path through a directed kNN graph (multi-source Dijkstra from stem seeds), after raycloudtools' rayextract trees (Devereux et al. 2026).
merge_branches function Drop candidates that are branches or secondary stems of another candidate.
tree_heights function Set each tree's height and point count from the segmentation.
crown_metrics function Crown size of one segmented tree.
crown_metrics_all function crown_metrics for every tree in one pass (parallel).
detect_buttress function Does a stem have buttresses, and how high do they reach?
convex_hull_area function Area of the convex hull of 2D points.
crown_shape function Crown shape from a tree's points (or any 3-D outline of the crown).

sylva.qsm

Name Kind Summary
write_obj function Write several meshes to one OBJ file, one named object each.
write_ply_mesh function Write a binary little-endian PLY triangle mesh.
PlotQSMs class Every tree of a plot modelled; build with build_plot.
PlotQSMs.volume method Wood volume of one tree (m³), buttress included where there is one.
PlotQSMs.total_volume property Wood volume of the whole plot (m³).
PlotQSMs.table method One row per tree, ready for a CSV.
PlotQSMs.to_csv method Write table as a CSV.
PlotQSMs.write_meshes method Write a surface mesh per tree into directory.
PlotQSMs.write_cylinders method Write one cylinder CSV per tree into directory.
build_plot function A QSM for every tree of a segmented plot.
QSM class A tree as connected cylinders; build with build_qsm.
QSM.column method One column of cylinders.
QSM.start property Cylinder start points, (n, 3).
QSM.axis property Unit axes, (n, 3).
QSM.end property Cylinder end points, start + axis * length.
QSM.volumes property Volume of each cylinder (m³).
QSM.total_volume property Woody volume of the tree (m³); multiply by basic density for biomass.
QSM.stem_volume property Volume of the order-0 cylinders (m³).
QSM.branch_volume property Volume of all branches, order >= 1 (m³).
QSM.total_length property Summed cylinder length (m).
QSM.max_branch_order property Highest branch order (0 for a bare stem or empty model).
QSM.dbh property Stem diameter at 1.3 m above the base (m), from the stem cylinders.
QSM.metrics method Tree architecture from the cylinders.
QSM.branches method One row per branch (branch_id chain; the stem is order 0), as columns: id, order, parent (branch it grows from, -1 for the stem), n_cylinders, length (m), volume (m3), base_radius and length-weighted mean_radius (m), base_height and tip_height (m above the stem base), insertion_angle (deg between its direction over 0.5 m past its first cylinder, which only joins it to the parent's axis, and the parent's direction over 0.5 m either side of the junction), zenith and azimuth of the base-to-tip chord (deg), tortuosity (length over chord), n_children and measured_fraction (share of the length fitted to points).
QSM.summary method Headline numbers with units in the keys.
QSM.to_csv method Write the cylinders as CSV with a header of COLUMNS.
QSM.to_treefile method Write in the raycloudtools/treetools _trees.txt format.
QSM.from_csv method Read cylinders written by to_csv.
QSM.mesh method Triangle mesh of the cylinders.
QSM.to_obj method Write the cylinder mesh as a Wavefront OBJ (Blender, MeshLab, CloudCompare).
QSM.volume_above method Cylinder volume above a horizontal plane, cutting cylinders that cross it.
QSM.above method The model above a horizontal plane, cutting cylinders that cross it.
QSM.to_ply method Write the cylinder mesh as a binary PLY with face colours.
fit_cylinder function Least-squares cylinder through 3D points.
fit_cylinder_ransac function Cylinder fit that tolerates outliers (leaves, twigs, noise).
skeletonize function Graph skeleton of one tree, the first stage of build_qsm.
build_qsm function Skeletonise then fit cylinders for a single segmented tree.
Buttress class An irregular stem base as a closed mesh; build with buttress_mesh.
Buttress.total_volume method Buttress volume plus the QSM's volume above the buttress.
Buttress.fuse method Join this buttress to a QSM as one mesh of the whole stem.
Buttress.to_obj method Write the mesh as a Wavefront OBJ object named buttress.
Buttress.to_ply method Write the mesh as a binary PLY.
TreeMesh class A buttress and a QSM as one mesh; build with Buttress.fuse.
TreeMesh.volume property Whole-stem volume (m³): buttress plus the wood above it.
TreeMesh.to_obj method Write the mesh as objects buttress and wood.
TreeMesh.to_ply method Write the mesh as a binary PLY, the buttress darker than the wood.
buttress_mesh function Rebuild a buttressed or otherwise irregular stem base as a closed mesh.
wood_points function Leaf / wood separation for one tree's points, returning the wood thinned to voxel_size.

sylva.leaves

Name Kind Summary
classify_leaf_wood function Wood (True) / leaf (False) for every point of one tree.
LeafAngleDistribution class Leaf inclination angle distribution (inclination = angle between the leaf normal and the vertical; 0 deg is a horizontal leaf).
LeafAngleDistribution.goel_strebel property The beta fit as Goel and Strebel's (1984) (mu, nu): (beta_b, beta_a).
LeafAngleDistribution.mean_deg property Mean leaf inclination in degrees (57.3 for spherical).
LeafAngleDistribution.g method Leaf projection function G for this distribution (Wilson 1960).
LeafAngleDistribution.from_type method A textbook de Wit (1965) distribution.
leaf_angle_distribution function Leaf angle distribution from leaf points.
LeafAreaGrid class One-sided leaf area density on a regular grid.
LeafAreaGrid.area property Leaf area per voxel (m²), shaped like density.
LeafAreaGrid.total_area property Total one-sided leaf area (m²).
LeafAreaGrid.scaled_to method Rescale to a known total leaf area, keeping the spatial pattern.
LeafAreaGrid.profile method Vertical leaf area profile.
LeafAreaGrid.cells method Voxels that hold leaf area.
LeafAreaGrid.from_voxels method Leaf area density from a ray-traced grid.
leaf_area_density function Leaf area density from leaf points alone.
single_leaf_area function One-sided area of one leaf of the given size.
LeafShape class The blade one leaf is cut from, and how big it is.
LeafShape.area property One-sided area of one leaf (m²): the sum of its triangles.
LeafShape.resized method The same blade at a new size.
LeafShape.scaled_to method The same blade and aspect ratio, scaled to a one-sided area (m²).
LeafShape.from_mesh method A custom blade from a mesh of one leaf.
LeafShape.from_obj method A custom blade from an OBJ file holding one leaf.
default_leaf function The leaf add_leaves uses when none is given.
set_default_leaf function Set the leaf add_leaves uses when none is given.
LeafMesh class Leaf polygons from add_leaves; len() is the leaf count.
LeafMesh.total_area property One-sided leaf area of all leaves (m²).
LeafMesh.to_obj method Write the leaves as one OBJ object named leaves.
add_leaves function Leaf polygons for a QSM.
write_tree_obj function Write wood cylinders and leaves to one OBJ, as objects wood and leaves.

sylva.canopy

Name Kind Summary
VoxelGrid class Point counts on a regular 3D grid; build with voxelize.
VoxelGrid.occupied property Boolean (nz, ny, nx), True where a voxel holds at least one point.
VoxelGrid.shape property Grid size as (nx, ny, nz) (the reverse of counts.shape).
VoxelGrid.z_levels method Bottom z of each voxel layer.
VoxelGrid.occupied_centers method Centres of the occupied voxels, e.g. for plotting.
VoxelGrid.vertical_profile method Fraction of voxels occupied in each layer.
voxelize function Count points per voxel.
vertical_profile function Point counts by height above ground.
pad_profile_voxel function Plant area density profile by the vertical contact-frequency method (simplified Hosoi & Omasa 2006, vertical beams, G = 0.5): PAD_i = -ln(1 - N_i) / (G dz), where N_i is the fraction of voxel columns not yet intercepted above layer i that are occupied in it.
gap_fraction_zenith function Directional gap fraction by zenith ring from pulses that include misses.
gap_fraction_pattern function Gap fraction by zenith ring for a RIEGL scan whose no-return pulses are absent from the stream (RiVLib). The number of pulses fired per ring comes from the angular scan pattern (see Shots.expected_per_zenith); a fired pulse with no echo above min_height is a gap. Pass the shots in the scanner frame, or pulses_per_line from the scanner-frame shots.
lai_from_gap_fraction function Effective PAI from directional gap fraction.
canopy_cover function Canopy cover from a canopy height model.
DensityGrid class Ray-traced voxel statistics (raycloudtools / Lowe et al. 2021 style).
DensityGrid.z_levels method Bottom z of each voxel layer.
DensityGrid.centers method Voxel-centre coordinates.
DensityGrid.height_above method Height of each voxel centre above the terrain.
DensityGrid.pai property Plant area index: the layer means summed over height (m² m⁻²).
DensityGrid.mask_ground method Remove ground voxels so terrain returns do not count as plant material.
DensityGrid.profile_above_ground method Plant area density by height above the terrain.
density_grid function Ray-trace pulses through a voxel grid and estimate plant area density.
fit_ground_plane function Ground plane z = a x + b y + c through the lowest point of every cell (m) grid cell, optionally within radius of centre (xy), fitted with Huber-weighted least squares so tree bases and pits pull little (after Calders et al. 2014).
fired_pulses_per_ring function Pulses a RIEGL scan fired into each zenith ring, for streams without the pulses that returned nothing (RiVLib). shots_scanner in the scanner frame, read with shot_stride.
fired_pulses_from_points function Pulses a scan fired into each zenith ring, from its returns alone.
GapProfile class Gap probability by zenith ring, azimuth sector and height above ground, pooled over scans (Jupp et al. 2009), and what follows from it.
GapProfile.empty method Start an empty profile.
GapProfile.add_scan method Add one scan position's pulses; echo_heights above ground, one per echo. Without fired_per_ring the shots must include the pulses that returned nothing (e.g. Shots.fill_missing or a ray cloud).
GapProfile.heights property Top of each height bin (m): the profile at z counts returns below it.
GapProfile.zenith property Ring centres (deg).
GapProfile.pgap method Gap probability by ring and height.
GapProfile.pai_profile method Cumulative plant area index below each height (effective, not corrected for clumping).
GapProfile.pavd_profile method Plant area volume density: the height derivative of pai_profile.
GapProfile.clumping method Lang & Xiang (1986) clumping index at the ring holding zenith: ln(mean P) / mean(ln P) over every (scan, azimuth sector) segment. 1 is random foliage; below 1 clumped.
GapProfile.report method Plot summary: effective PAI (hinge, linear, weighted), mean leaf angle from the linear fit, clumping index and clumping-corrected hinge PAI, canopy height (where the hinge PAI profile reaches top_fraction of its total), canopy closure at 57.5 deg, cover at the steepest ring measured, and the profiles.

sylva.voxels

Name Kind Summary
laser_spec function Beam geometry of a known scanner.
leaf_projection function Leaf projection function G(θ) of an analytic leaf angle distribution.
RayVoxelGrid class Voxel statistics from ray_voxelize.
RayVoxelGrid.origin property Minimum corner of the grid, (x, y, z).
RayVoxelGrid.voxel_size property Voxel edge (m).
RayVoxelGrid.shape property Grid size as (nx, ny, nz); arrays are (nz, ny, nx).
RayVoxelGrid.fields property Names of the raw accumulators this grid holds (depends on the options).
RayVoxelGrid.metrics property Names of the derived metrics; see the class notes.
RayVoxelGrid.observed property Boolean (nz, ny, nx): voxels crossed by at least one pulse before its last echo.
RayVoxelGrid.occlusion_profile method What the scan saw of the canopy space, layer by layer.
RayVoxelGrid.observed_map method Map of how much of each column's canopy space was observed.
RayVoxelGrid.z_levels method Bottom z of each voxel layer.
RayVoxelGrid.centers method Voxel-centre coordinates.
RayVoxelGrid.profile method Mean of a metric per vertical layer over voxels crossed by at least min_beams pulses (unobserved voxels do not count as empty). Multiply by the voxel size and sum for a plant area index.
RayVoxelGrid.tree_iad property Per-tree inclination angle distributions: normalised liad / wiad / piad histograms over bin_centres (rad), the angle-integrated g_leaf / g_wood / g_plant and the closest de Wit type of each. Empty unless inclination=True.
RayVoxelGrid.add_wood_volume method Add QSM wood volume to the grid.
RayVoxelGrid.to_dict method Copy arrays out by name.
RayVoxelGrid.write method Write a .vox voxel-space file, or a space-delimited .txt table with voxel centres (format "vox" / "text", by default from the extension). Observed and occluded voxels are written unless filled_only or include_unobserved.
RayVoxelGrid.write_iad_csv method Write per-tree inclination distributions as CSV.
ray_voxelize function Trace shots through a voxel grid (see the module docstring).
tree_sampling function How well each tree was seen, from a ray-traced grid built with occlusion=True (so occluded voxels are told from unreached ones).

sylva.voxels.blocks

Name Kind Summary
BlockedVoxelGrid class A ray-traced voxel grid kept on disk block by block.
BlockedVoxelGrid.path property Directory of the grid.
BlockedVoxelGrid.origin property Minimum corner of the grid, (x, y, z).
BlockedVoxelGrid.voxel_size property Voxel edge (m).
BlockedVoxelGrid.shape property Grid size as (nx, ny, nz); arrays are (nz, ny, nx).
BlockedVoxelGrid.block_size property Voxels per block along x, y and z (the last block of an axis may be shorter).
BlockedVoxelGrid.n_blocks property Blocks along x, y and z.
BlockedVoxelGrid.fields property Names of the raw fields.
BlockedVoxelGrid.metrics property Names of the derived metrics, as for ~sylva.voxels.RayVoxelGrid.
BlockedVoxelGrid.blocks_present method Blocks written to disk, (bx, by, bz); the others hold no pulse.
BlockedVoxelGrid.block method One block as a grid of its own.
BlockedVoxelGrid.blocks method Every block, one at a time, as ((bx, by, bz), grid), z slowest.
BlockedVoxelGrid.read method Voxels lo to hi as a grid of their own.
BlockedVoxelGrid.to_grid method The whole grid in memory (about 0.13 kB per voxel).
BlockedVoxelGrid.observed property Boolean (nz, ny, nx): voxels crossed by a pulse before its last echo.
BlockedVoxelGrid.profile method Mean of a field or metric per layer; see sylva.voxels.RayVoxelGrid.profile.
BlockedVoxelGrid.occlusion_profile method What the scan saw of the canopy space; see sylva.voxels.RayVoxelGrid.occlusion_profile.
BlockedVoxelGrid.observed_map method Observed share of each column; see sylva.voxels.RayVoxelGrid.observed_map.
BlockedVoxelGrid.write method Write the grid as one .vox or text file, a slab of blocks at a time.
open_blocked function Open a grid written by sylva.voxels.ray_voxelize with out=.

sylva.quality

Name Kind Summary
scan_ids_from_origins function Scan position of each point, from its sensor origin.
StemNoise class Result of stem_noise; tables are dicts of equal-length arrays.
StemNoise.summary method Plot-level quality figures, in metres.
stem_noise function Stem-based noise and registration of cloud.

sylva.waveform

Name Kind Summary
Waveform class One digitised waveform: a view of a row of Waveforms.
Waveform.times method Time of each sample after the first (ns).
Waveform.positions method Position of each sample.
Waveforms class A set of waveforms, their geometry and their samples.
Waveforms.n_waveforms property Number of waveforms (rows).
Waveforms.n_samples property Number of samples over all waveforms.
Waveforms.sample_positions method Position of every sample, in the order of samples.
Waveforms.sample_times method Time of every sample after its waveform's first sample (ns).
Waveforms.subset method Select waveforms.
Waveforms.concatenate method Stack waveform sets, e.g. the chunks of chunks.
Waveforms.write_las method Write as LAS 1.4 with waveform data packets; see write_las.
Waveforms.write_pulsewaves method Write as PulseWaves; see write_pulsewaves.
Waveforms.decompose method Gaussian decomposition; see decompose.
Echoes class Echoes found by decompose (or the truth of sylva.synthetic.waveforms), one row per echo, grouped by waveform in ascending order.
Echoes.energy property Area under each echo, amplitude * width * sqrt(2 pi) (sample units times ns).
Echoes.cross_section method Backscatter cross-section of each echo; see backscatter_cross_section.
Echoes.to_pointcloud method The echoes as points.
Echoes.to_shots method Pulses with these echoes; see to_shots.
info function Describe a waveform file without reading its waveforms.
read function Read waveforms from a LAS/LAZ or PulseWaves file.
chunks function Stream a waveform file in chunks.
write_las function Write waveforms as LAS 1.4 point format 9 with waveform data packets.
write_pulsewaves function Write waveforms as PulseWaves 0.3 (path and a .wvs next to it).
estimate_noise function Background level and noise of each waveform.
smooth function Smooth the samples with a Gaussian kernel.
decompose function Gaussian decomposition of waveforms into echoes (Wagner et al. 2006).
to_shots function Pulses from decomposed waveforms, for ray tracing and canopy metrics.
backscatter_cross_section function Backscatter cross-section of echoes (Wagner et al. 2006).
calibration_constant function Calibration constant C_cal from echoes of reference targets.

sylva.als

Name Kind Summary
classify_ground function Classify ground over a whole catalogue and write the classified tiles.
dtm function Digital terrain model of a whole catalogue, seamless across tiles.
chm function Canopy height model of a whole catalogue: the highest point per cell.
normalize function Height above ground for every point of a catalogue, written as tiles.
filter function Remove noise (isolated points: birds, multipath, atmospheric returns).
retile function Cut a catalogue into new square tiles.
decimate function Thin a catalogue.
write_tiles function Write a cloud as square LAS/LAZ tiles.
Tile class One LAS/LAZ file of a Catalog, as its header describes it.
Tile.xy_bounds property (xmin, ymin, xmax, ymax) of the tile.
Tile.area property Area of the tile's extent (m²).
Chunk class A piece of a catalogue processed at once.
Chunk.buffer property Width of the buffer (m).
Catalog class Tiles of an airborne survey, known from their headers alone.
Catalog.paths property Paths of the tiles.
Catalog.n_points property Points in all tiles, from the headers.
Catalog.bounds property (xmin, ymin, zmin, xmax, ymax, zmax) over all tiles; None if empty.
Catalog.crs property The CRS every tile declares, or None if they differ or declare none.
Catalog.issues method Everything that could make processing fail or mislead.
Catalog.validate method Raise if issues finds anything.
Catalog.report method A plain-text summary: extent, points, density, formats, CRS and issues.
Catalog.summary method The numbers behind report.
Catalog.overlaps method Pairs of overlapping tiles.
Catalog.gaps method Holes in the coverage.
Catalog.chunks method Divide the catalogue into buffered chunks.
Catalog.read method Read the points inside a box, from whichever tiles hold them.
catalog function Build a catalogue from LAS/LAZ files, reading only their headers.
apply function Run a function over a catalogue, chunk by chunk, with buffers.

sylva.als.tiles

Name Kind Summary
RunInfo class What a tiled run did, to check that memory stayed bounded.
last_run function The RunInfo of the last tiled operation of this module.
from_scans function Build square tiles from scans, thinned on one global voxel grid.
voxel_downsample function Thin tiles to the first point of each voxel of one global grid.
statistical_outlier_removal function Statistical outlier removal over all the tiles, as on the whole cloud.
radius_outlier_removal function Radius outlier removal over all the tiles, as on the whole cloud.
estimate_normals function Add surface normals to every point of the tiles.
planarity_linearity function Add planarity and linearity to every point of the tiles.
classify_ground function Classify ground in every tile (sylva.als.classify_ground, one chunk per tile).
dtm function Digital terrain model of all the tiles (sylva.als.dtm, one chunk per tile).
normalize function Height above ground for every point of the tiles (sylva.als.normalize).
detect_stems function Detect stems over all the tiles, as in the whole cloud.

sylva.als.metrics

Name Kind Summary
metric_names function Names of the standard metrics, in the order they are computed.
cloud_metrics function The standard metrics of one cloud.
grid_metrics function Rasters of area-based metrics over a whole catalogue.
PlotMetrics class Metrics of plots, one row per plot, from plot_metrics.
PlotMetrics.row method The metrics of plot i as a dict.
PlotMetrics.as_dict method The table as a dict of arrays (a copy).
PlotMetrics.to_pandas method The table as a pandas.DataFrame (needs pandas).
PlotMetrics.to_csv method Write the table as CSV (empty cells for NaN).
plot_metrics function Area-based metrics of field plots from a catalogue.

sylva.als.canopy

Name Kind Summary
ALSProfile class Gap-fraction counts of an area, per grid cell and height layer.
ALSProfile.shape property (nz, ny, nx): layers and cells.
ALSProfile.heights property Bottom of each layer (m above ground).
ALSProfile.pad method Plant area density of every layer and cell (m²/m³).
ALSProfile.pai method Plant area index of each cell above min_height.
ALSProfile.cover method Canopy cover of each cell: 1 - P at min_height.
ALSProfile.profile method Plant area density profile of an area, from its pooled counts.
ALSProfile.pgap method Gap probability profile of an area: the share of the pooled weight below each layer boundary.
ALSProfile.pooled_pai method Plant area index of an area from its pooled counts (see profile).
ALSProfile.metrics method Summary metrics of each cell's profile, as rasters, for use beside the height metrics of sylva.als.grid_metrics in a model of height, cover or biomass.
ALSProfile.area_metrics method The metrics of metrics for an area, from its pooled counts (the area seen as one column, as profile).
ALSProfile.plot_cells method The cells of each plot: those whose centre lies inside it.
ALSProfile.plot_metrics method The metrics of metrics for field plots, each from the pooled counts of the cells whose centre lies inside it, as a table to join with sylva.als.plot_metrics and the plot data.
gap_profile function Gap-fraction profiles, plant area density and plant area index.
ALSVoxels class Ray-traced voxel fields of an airborne survey, from ray_voxelize.
ALSVoxels.shape property (nz, ny, nx).
ALSVoxels.z_levels property Bottom z of each layer.
ALSVoxels.profile method Mean of a field per height above ground.
ALSVoxels.pai method Plant area index of each column: the sum of a density field times the voxel size.
ray_voxelize function Trace the pulses of a survey through one voxel lattice.

sylva.als.trajectory

Name Kind Summary
Trajectory class The path of the scanner: positions, and optionally attitude, in time.
Trajectory.xyz property (N, 3) positions.
Trajectory.has_attitude property Whether roll, pitch and heading are known.
Trajectory.from_dict method From a mapping of arrays, such as sylva.synthetic.ALSFlight.trajectory.
Trajectory.positions method Sensor position at each time, linearly interpolated.
Trajectory.attitude method Roll, pitch and heading at each time, linearly interpolated.
week_seconds function GPS seconds of the week of adjusted standard GPS times.
read_trajectory function Read a trajectory file: an SBET or a delimited text table.
estimate_trajectory function An approximate trajectory from the returns themselves.
pulses function Group discrete returns into pulses fired from the sensor.

sylva.als.trees

Name Kind Summary
LinearWindow class A window size that grows linearly with height: clip(intercept + slope * h, min, max) metres for a site h m high.
TreeTops class Tree tops from locate_trees.
TreeTops.xyz property (k, 3) array of x, y, height.
locate_trees function Tree tops by the local maximum filter (Popescu and Wynne 2004).
segment_crowns function Crowns on a canopy height model, grown from tree tops.
li2012 function Point-based tree segmentation of Li et al. (2012).
crown_hull function Outline of a crown's points seen from above.
Trees class Trees found by segment_trees or find_trees.
Trees.table method The per-tree columns: id, x, y, height, crown_area and n_points.
Trees.to_csv method Write table as CSV, one row per tree.
Trees.to_geojson method Write the trees as a GeoJSON FeatureCollection.
segment_trees function Find the trees of one cloud: tops, crowns and each point's tree.
find_trees function Find the trees of a whole catalogue, and optionally write every tile with each point's tree id.

sylva.change

Name Kind Summary
Estimate class One plot-level quantity with its interval.
PlotSummary class Result of plot_summary.
PlotSummary.as_dict method {name: (estimate, low, high, unit)} as plain tuples.
PlotSummary.report method Plain-text table of the quantities and their intervals.
plot_summary function Growth, mortality and recruitment of a plot, with intervals.
Occupancy class Voxel occupancy change between two epochs, from occupancy.
Occupancy.mask method Boolean (nz, ny, nx) mask of one class.
Occupancy.counts method Number of voxels in each class.
Occupancy.volume method Volume (m³) of the voxels in one class.
Occupancy.centers method Centres of the voxels in one class, e.g. to plot what was lost.
occupancy function Voxel occupancy change between two epochs of a plot.
TreeMatch class Result of match_trees.
TreeMatch.survivors property (tree in epoch a, tree in epoch b) of every survivor.
TreeMatch.deaths property Trees of the first epoch not found in the second.
TreeMatch.recruits property Trees of the second epoch not found in the first.
TreeMatch.merged property (tree in epoch a, stem in epoch b it went into) of the trees of the first epoch that merged into a neighbour's stem.
TreeMatch.split property (stem in epoch a it came from, tree in epoch b) of the trees of the second epoch that split off a stem of the first.
TreeMatch.ambiguous_pairs method Survivor pairs involved in a merge or a split, whose increments compare a stem with more (or less) than itself.
TreeMatch.counts method Numbers of survivors, deaths and recruits, and of the trees of either epoch in a merge or a split.
match_trees function Match the trees of two epochs: survivors, deaths and recruits.
TreeIncrements class Result of tree_increments: one row per survivor.
TreeIncrements.as_dict method The table as a dict of arrays (a copy).
TreeIncrements.to_pandas method The table as a pandas.DataFrame (needs pandas).
tree_increments function DBH, height and crown increments of the survivors, each with the smallest increment the data can detect.
QSMChange class Change between two models of one tree; from compare_qsms.
QSMChange.change property Total volume change, volume_b - volume_a (m³).
QSMChange.branches method Unmatched branches of one status.
QSMChange.summary method Headline numbers with units in the keys.
compare_qsms function Compare two models of one tree from two epochs.
PlotQSMChange class QSM change over a plot; from compare_plot_qsms.
PlotQSMChange.table method The rows, ready for pandas.DataFrame or a CSV.
PlotQSMChange.to_csv method Write table as a CSV (empty cells for NaN and missing ids).
compare_plot_qsms function Compare the QSMs of every tree of a plot between two epochs.
EpochAlignment class Result of align_epochs: the later epoch in the frame of the earlier one, and how well that is known.
EpochAlignment.n_stems property Stems matched between the epochs.
EpochAlignment.apply method The new epoch's cloud moved into the reference frame.
EpochAlignment.report method Plain-text summary for a log or a QC record.
align_epochs function Align a later epoch onto an earlier one on features that do not change.
ProvenanceWarning class Two epochs were processed with different software or settings.
Provenance class Result of provenance.
Provenance.consistent property Were all epochs processed with the same version and settings?
Provenance.to_json method The records as JSON text, to store beside each epoch's products.
provenance function Record how each epoch was processed, and compare the epochs.
PointDistances class Distances between two epochs at a set of core points.
PointDistances.to_cloud method The core points with the results as attributes.
distances function Distances between two epochs of a point cloud.
DoD class A raster of difference with its level of detection.
DoD.thresholded method The difference where it is significant, 0 elsewhere and NaN where it could not be assessed.
dod function Raster of difference between two epochs (a DTM or CHM of difference).

sylva.change.als

Name Kind Summary
ALSAlignment class Offsets of a second airborne survey relative to a first, from align_surveys.
ALSAlignment.constant method A known constant offset.
ALSAlignment.offset_at method Offset (dx, dy, dz) of the second survey at points.
ALSAlignment.sigma_at method Standard deviation of offset_at.
ALSAlignment.apply method Move a cloud of the second survey into the frame of the first.
ALSAlignment.table method One row per block with an estimate: centre x, y, the block's dx, dy, dz and their standard deviations sd_dx, sd_dy, sd_dz, the model's model_dx, model_dy, model_dz there, n_used, n_eff, horizontal_determined, spread_before and spread_after.
ALSAlignment.to_csv method Write table as CSV.
ALSAlignment.report method A summary in words.
align_surveys function Offsets between two airborne surveys, on stable surfaces.
MetricChange class Area-based metrics of two surveys compared, from metric_change.
MetricChange.report method Per metric: median difference and the shares of cells with a significant gain and loss.
metric_change function Differences of area-based metrics between two surveys, with their level of detection.
PAIChange class Plant area index of two surveys compared, from pai_change.
PAIChange.mask method Cells of one class.
pai_change function Plant area index change from two gap-fraction profiles.
profile_change function Plant area density profile of an area in two surveys, from the pooled counts of its cells.
SurfaceChange class A surface of two airborne surveys compared, from surface_change.
SurfaceChange.mask method Cells of one class.
SurfaceChange.areas method Area (m²) of each class.
SurfaceChange.report method A summary in words, with the sensor notes.
SurfaceChange.write method Write a, b, difference, lod and classes as rasters named <surface>_<layer>.
surface_change function Difference of a CHM, DSM or DTM of two surveys with a level of detection per cell.
chm_change function Canopy height model change: surface_change with surface="chm".
dtm_change function Terrain change: surface_change with surface="dtm".
harmonise function Thin two surveys to a common pulse density and write them as tiles.
Gaps class Canopy gaps of one CHM, from canopy_gaps.
Gaps.gap_fraction property Share of the area with data that is gap.
Gaps.table method id, area, n_cells, x, y, mean_height and max_height per gap.
Gaps.size_distribution method Number of gaps per size class.
Gaps.size_exponent method Exponent of a power law p(a) ~ a^-alpha fitted to the gap sizes by maximum likelihood (Clauset et al. 2009).
Gaps.to_geojson method Write the gap outlines as GeoJSON polygons with table as properties.
canopy_gaps function Canopy gaps of a CHM: connected cells no higher than height.
GapChange class Canopy gaps of two surveys and their dynamics, from gap_change.
GapChange.summary method Gap fractions, areas formed and closed (with annual rates as a share of the area compared when years is known), gap counts by status and the size-distribution exponents of both surveys.
GapChange.report method A summary in words.
GapChange.to_geojson method Write one survey's gaps with their status and area formed or closed.
gap_change function Gap formation and closure between two surveys.
ALSTreeChange class Trees of two airborne surveys compared, from tree_change.
ALSTreeChange.counts method Rows per status (undetected and unobserved split by the survey the tree was found in).
ALSTreeChange.summary method Totals: trees by fate, mean height growth of the survivors with its standard error (from their scatter, and from their measurement uncertainties alone), crown area lost and, with years, annual mortality and recruitment rates (Sheil et al. 1995). With area (m²), counts and crown areas are also given per hectare.
ALSTreeChange.grid method Totals per grid cell: survivors, damaged, dead, recruits, mean_growth, growth_se and crown_area_lost (m²).
ALSTreeChange.to_csv method Write the table as CSV.
ALSTreeChange.to_pandas method The table as a pandas DataFrame.
ALSTreeChange.report method A summary in words.
tree_change function Airborne trees of two surveys matched, with height growth, mortality, damage and recruitment.

sylva.fusion

Name Kind Summary
TreeLinks class TLS trees linked to ALS trees, from link_trees.
TreeLinks.counts method Numbers of TLS trees by status, of ALS trees with a matched stem and without, and of ALS crowns holding two stems or more.
TreeLinks.one_to_many method ALS trees with more than one TLS stem under them.
TreeLinks.table method One row per TLS tree: its TLS measurements, its link and the combined height.
TreeLinks.als_table method One row per ALS tree: id, x, y, height, tls_id (its matched TLS tree, -1 for none), n_stems (TLS stems linked to it or under it) and stems (their ids).
TreeLinks.to_csv method Write table as CSV (empty cells for NaN).
link_trees function Link TLS stems to ALS trees and combine their measurements.
merge_clouds function One cloud from both instruments: TLS below the split, ALS above.
FusedProfile class A plant area density profile from both instruments, from fuse_profiles.
FusedProfile.pai method Plant area index: the sum of the PAD of the bins times their height.
FusedProfile.table method The profile as columns: height, pad, weight_tls, weight_als, pad_tls, pad_als, beams_tls, beams_als, observed_tls, observed_als.
fuse_profiles function One plant area density profile from TLS and ALS voxels.
plot_values function Plot totals per hectare from a plot's TLS trees.
Model class A regression of plot values on ALS metrics, from fit_model.
Model.equation method The fitted model as text.
Model.summary method Coefficients, fit and leave-one-out statistics as text.
Model.predict method Predict at new predictor values.
fit_model function Regress plot values on ALS metrics.
Upscaling class A model and its wall-to-wall prediction, from upscale.
Upscaling.to_ascii_grids method Write the rasters as ESRI ASCII grids.
upscale function Fit plot values on ALS metrics and predict them over the ALS grid.
synthetic_scan function Scan a synthetic scene from the ground as sylva.synthetic.als_flight flies it.
Registration class A TLS plot placed on an ALS survey, from register.
Registration.std property Standard errors of the pivot's x, y, z (m) and the heading (degrees): the larger of the formal and the jackknife ones, NaN where neither exists.
Registration.apply method The TLS cloud moved into the ALS frame.
Registration.to_dict method Everything as plain lists and numbers, for JSON.
Registration.save method Write to_dict as JSON (NaN written as null).
Registration.load method Read a registration written by save.
Registration.report method A short text summary of the pose, its checks and its uncertainty.
register function Register a TLS plot onto an ALS survey.

sylva.geo.coords

Name Kind Summary
ApproximateTransformationWarning class A reprojection could not apply part of the transformation (a datum shift without known parameters, or a change of vertical datum).
translation_matrix function A 4x4 translation.
rotation_matrix function A 4x4 rotation about an axis through a point.
CRS class What Sylva understands of a coordinate reference system.
crs_info function Parse a CRS.
same_crs function Whether two CRS definitions describe the same system.
Transformation class How reproject gets from one CRS to another.
transformation function Describe the transformation between two CRSs without applying it.
reproject function Transform coordinates into another coordinate reference system.
apply_transforms function Put scans into one frame with their registration matrices.

sylva.geo.interpolate

Name Kind Summary
transfer_attributes function Interpolate attributes of one cloud onto the points of another.
grid function Interpolate point values onto a regular grid.
sample_raster function Add the value of a raster at each point as an attribute.
sample_rasters function Add the values of several rasters at each point as attributes.

sylva.geo.masks

Name Kind Summary
Polygon class A polygon: an exterior ring and optional holes, in x, y.
MultiPolygon class One feature of a polygon layer: polygons treated as one shape.
Polygons class A polygon layer, as returned by read_polygons.
Polygons.properties property The attributes of every feature, in order.
read_polygons function Read the polygons of a shapefile or a GeoJSON file.
polygon_index function Which polygon each point falls in.
inside_polygons function Mask of the points whose x, y fall inside any of the polygons.
crop_polygons function Keep the points inside (or outside) polygons.
raster_mask function Mask of the points whose raster cell satisfies a condition.
crop_raster function Keep the points whose raster cell satisfies a condition.
expression function Mask of the points satisfying an expression over their attributes.
crop_expression function Keep the points satisfying an attribute expression.
near function Mask of the points within a distance of another cloud.
crop_near function Keep the points within a distance of another cloud.
difference function Points of cloud farther than distance from every point of other.

sylva.synthetic

Name Kind Summary
terrain_height function Ground elevation of the synthetic scenes: a gentle slope with a ripple.
tree function One tree: a tapered stem, n_branches limbs in the upper half and small flat leaf discs around the limb ends.
leaf_area function True one-sided leaf area of a synthetic cloud.
forest function Sloped terrain with a few trees standing on it (z is not normalised). The ground extends margin m beyond the size m square so that no crown overhangs the edge of the terrain.
scan function A pseudo terrestrial scan of cloud from origin.
ALSFlight class A simulated airborne survey, from als_flight.
ALSFlight.sensor_positions method Where the scanner was when each pulse left.
ALSFlight.write_tiles method Write the returns as square LAS/LAZ tiles.
als_flight function Fly a simulated airborne laser scanner over a synthetic scene.
ForestEpochs class Two scanned epochs of one synthetic plot and their truth; see forest_epochs.
ForestEpochs.of_kind method The changes of one kind.
forest_epochs function Two epochs of one synthetic plot with known changes, each scanned.
waveforms function Full waveforms of pulses whose targets are known.
stand function Random trees for forest: a stand of a given density.
crown_forest function A scene of trees with solid crowns, for airborne lidar.
forest_trees function The true trees of a scene from forest, to check tree detection and crown delineation against.
ALSEpochs class Two airborne surveys of one synthetic forest; see als_epochs.
ALSEpochs.write_tiles method Write both surveys as tiles, the second displaced by offset.
als_epochs function Two airborne surveys of a synthetic forest with known changes.

sylva.synthetic.model

Name Kind Summary
archetype function The architectural constants of an archetype.
SyntheticTree class A tree from tree_model with its truth.
SyntheticTree.wood_volume property Volume of the wood (m³), the sum of the cylinders.
SyntheticTree.volume_by_order method Wood volume (m³) per branch order, from the cylinders.
SyntheticTree.length_by_order method Axis length (m) per branch order, from the cylinders.
SyntheticTree.leaf_angles method The leaf angle distribution of the generated leaves, weighted by their area.
tree_model function A tree with a realistic architecture and its truth.
Plot class A plot from plot with its truth.
Plot.qsm method The cylinders of one tree.
Plot.ground_height method The terrain's elevation.
Plot.stem_density property Stems per hectare.
Plot.basal_area property Basal area (m² ha⁻¹).
plot function A forest plot of tree_model trees, with its truth.
scanner_preset function Field of view and beam of a scanner model, as synthetic.scan takes them.

sylva.util.progress

Name Kind Summary
state function The stages running now, outermost first.
task function Report a stage of a Python loop.
bar function Watch the work while it runs.

sylva.util.limits

Name Kind Summary
available function Memory the system reports as free (bytes).
budget function The most one allocation may ask for (bytes).
set_budget function Set the budget for this process.
human function Bytes as a person writes them ("3.2 TB").
check function Refuse an allocation of cells * per_cell bytes that will not fit.