get_com_offset: Horizontal offset of center of mass from QSM

View source: R/traits_from_qsm.R

get_com_offsetR Documentation

Horizontal offset of center of mass from QSM

Description

This function extracts the horizontal distance between the base of a tree and the center of a tree from a QSM. The function takes the coordinate of the lowest QSM segment, and the center of mass, and finds the horizontal distance between them.

Usage

get_com_offset(qsm)

Arguments

qsm

a QSM loaded using '[load_qsm()]'.

Value

A single numeric value giving the horizontal distance (m) between the base of the tree and the volume-weighted center of mass.

Examples

qsm_file = system.file("extdata", "tree_0744_qsm.txt", package='tReeTraits')
qsm = load_qsm(qsm_file)
print(get_center_of_mass(qsm))
print(get_com_offset(qsm))

tReeTraits documentation built on Feb. 26, 2026, 1:07 a.m.