Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::analysis::PeakIntegrationService Class Reference

High-performance numerical integration and automated peak feature detection. More...

#include <PeakIntegrationService.hpp>

Static Public Member Functions

static PeakIntegralResult integrateRange (std::span< const real_t > x_bins, std::span< const real_t > y_vals, real_t r_min, real_t r_max, std::optional< real_t > number_density=std::nullopt, bool is_radial=false)
 Numerically integrates a distribution across a specified domain range.
static std::optional< PeakIntegralResult > autoDetectPeakNear (std::span< const real_t > x_bins, std::span< const real_t > y_vals, real_t target_x, std::optional< real_t > number_density=std::nullopt, bool is_radial=false)
 Detects the nearest peak maximum to a clicked coordinate and integrates its shell.
static real_t calculateFWHM (std::span< const real_t > x_bins, std::span< const real_t > y_vals, std::size_t peak_idx, std::size_t min_idx, std::size_t max_idx) noexcept
 Calculates Full Width at Half Maximum (FWHM) around a identified peak index.

Detailed Description

High-performance numerical integration and automated peak feature detection.

Member Function Documentation

◆ autoDetectPeakNear()

std::optional< PeakIntegralResult > correlation::analysis::PeakIntegrationService::autoDetectPeakNear ( std::span< const real_t > x_bins,
std::span< const real_t > y_vals,
real_t target_x,
std::optional< real_t > number_density = std::nullopt,
bool is_radial = false )
staticnodiscard

Detects the nearest peak maximum to a clicked coordinate and integrates its shell.

Parameters
[in]x_binsDomain bin centers.
[in]y_valsFunction values.
[in]target_xSelected coordinate to search around.
[in]number_densityOptional macroscopic atomic number density ρ₀ (atoms/ų).
[in]is_radialTrue if distribution is radial g(r) or H(r).
Returns
Detected peak result, or std::nullopt if no valid peak exists.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateFWHM()

real_t correlation::analysis::PeakIntegrationService::calculateFWHM ( std::span< const real_t > x_bins,
std::span< const real_t > y_vals,
std::size_t peak_idx,
std::size_t min_idx,
std::size_t max_idx )
staticnodiscardnoexcept

Calculates Full Width at Half Maximum (FWHM) around a identified peak index.

Parameters
[in]x_binsDomain coordinates.
[in]y_valsAmplitudes.
[in]peak_idxIndex of peak maximum.
[in]min_idxLower search boundary index.
[in]max_idxUpper search boundary index.
Returns
Computed FWHM in coordinate units.
Here is the caller graph for this function:

◆ integrateRange()

PeakIntegralResult correlation::analysis::PeakIntegrationService::integrateRange ( std::span< const real_t > x_bins,
std::span< const real_t > y_vals,
real_t r_min,
real_t r_max,
std::optional< real_t > number_density = std::nullopt,
bool is_radial = false )
staticnodiscard

Numerically integrates a distribution across a specified domain range.

Parameters
[in]x_binsDomain bin centers.
[in]y_valsFunction values.
[in]r_minLower bound of integration range.
[in]r_maxUpper bound of integration range.
[in]number_densityOptional macroscopic atomic number density ρ₀ (atoms/ų).
[in]is_radialTrue if distribution is radial g(r) or H(r).
Returns
Computed integral result metrics.
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: