impl
Classes
Section titled “Classes”| Name | Description |
|---|---|
PF8Peak_v1 |
An identified peak within an image including associated metadata. |
RadialStatistics |
A wrapping container for buffers needed to compute radial background statistics. |
Functions
Section titled “Functions”| Return | Name | Description |
|---|---|---|
void |
compute_radial_background |
Compute the statistics to determine background signal in radial segments. |
void |
compute_local_background_ring |
Compute the background signal locally around a peak candidate. |
void |
integrate_peak_intensity |
Integrate a finalized peak candidate and write it to the output buffer. |
void |
ccl_peak_search |
Run the connected-components labelling and peak integration on an image. |
compute_radial_background
Section titled “compute_radial_background”void compute_radial_background(const float * data, const float * r_map, const bool * mask, RadialStatistics & rstats, std::size_t num_pixels, int niter = 5, float ADC_threshold = 10.0f, float min_SNR = 7.0f)Compute the statistics to determine background signal in radial segments.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data |
const float * |
The image data. |
r_map |
const float * |
The radius map for computing radial bins. |
mask |
const bool * |
The validity mask for each pixel in the image. |
rstats |
[RadialStatistics](api-xalgospp-features-impl-RadialStatistics.md#radialstatistics) & |
The output where background radial statistics are stored. |
num_pixels |
std::size_t |
The total number of pixels in the image (and mask, etc.). |
ADC_threshold |
float |
The cut-off for the pixel intensity. |
min_SNR |
float |
The minimum signal to noise ratio to use. |
compute_local_background_ring
Section titled “compute_local_background_ring”void compute_local_background_ring(const float * data, const float * r_map, const bool * mask, float peak_com_fs, float peak_com_ss, int width, int height, std::vector< std::uint8_t > & pix_in_peak_map, float & bg_sum, float & bg_sum_sq, float & bg_max_i, int & bg_count, RadialStatistics & rstats, int local_background_radius)Compute the background signal locally around a peak candidate.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data |
const float * |
The image data. |
r_map |
const float * |
The radius map for computing radial bins. |
mask |
const bool * |
The validity mask for each pixel in the image. |
peak_com_fs |
float |
The center of mass of the candidate in the fast-scan axis. |
peak_com_ss |
float |
The center of mass of the candidate in the slow-scan axis. |
width |
int |
The width of the image (fast-scan axis). |
height |
int |
The height of the image (slow-scan axis). |
pix_in_peak_map |
std::vector< std::uint8_t > & |
Registry holding pixels in each candidate peak. |
bg_sum |
float & |
The output local background intensity sum. |
bg_sum_sq |
float & |
The output local background intensity sum squared. |
bg_max_i |
float & |
The output local background maximum pixel intensity. |
bg_count |
int & |
The output number of pixels in the local background. |
rstats |
[RadialStatistics](api-xalgospp-features-impl-RadialStatistics.md#radialstatistics) & |
The pre-computed radial statistics for the GLOBAL background. |
local_background_radius |
int |
The radius to use for the local background. |
integrate_peak_intensity
Section titled “integrate_peak_intensity”void integrate_peak_intensity(const float * data, int width, int height, int num_pix_in_peak, int com_idx, PF8Peak_v1 * peak_list_out, int & peak_count, std::vector< int > & peak_pixels, float local_offset, float local_sigma, float bg_max_i, int max_number_peaks, long max_pixel_count, float min_SNR)Integrate a finalized peak candidate and write it to the output buffer.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data |
const float * |
The image data. |
width |
int |
The width of the image (fast-scan axis). |
height |
int |
The height of the image (slow-scan axis). |
num_pix_in_peak |
int |
The total number of pixels in the candidate peak. |
com_idx |
int |
The linearized pixel index for the peak center. |
peak_list_out |
[PF8Peak_v1](api-xalgospp-features-impl-PF8Peak_v1.md#pf8peak_v1) * |
The output buffer to write integrated peaks. |
peak_count |
int & |
The output counter for the total number of peaks found so far. |
peak_pixels |
std::vector< int > & |
The pixels in the peak. |
local_offset |
float |
The local background mean offset. |
local_sigma |
float |
The local background standard deviation. |
bg_max_i |
float |
The local background maximum pixel intensity. |
max_number_peaks |
int |
The maximum number of peaks to find. |
max_pixel_count |
long |
The maximum number of pixels to allow in a peak. |
min_SNR |
float |
The minimum signal-to-noise ratio to allow for a peak. |
ccl_peak_search
Section titled “ccl_peak_search”void ccl_peak_search(const float * data, const float * r_map, const bool * mask, PF8Peak_v1 * peak_list_out, int & num_peaks_out, RadialStatistics & rstats, std::vector< std::uint8_t > & pix_in_peak_map, std::vector< int > & infs, std::vector< int > & inss, std::vector< int > & peak_pixels, int width, int height, long min_pixel_count, long max_pixel_count, int local_background_radius, int max_number_peaks, float min_SNR = 7.0f)Run the connected-components labelling and peak integration on an image.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data |
const float * |
The image data. |
r_map |
const float * |
The radius map for computing radial bins. |
mask |
const bool * |
The validity mask for each pixel in the image. |
peak_list_out |
[PF8Peak_v1](api-xalgospp-features-impl-PF8Peak_v1.md#pf8peak_v1) * |
The output buffer to write integrated peaks. |
num_peaks_out |
int & |
The finalized count of peaks found. |
rstats |
[RadialStatistics](api-xalgospp-features-impl-RadialStatistics.md#radialstatistics) & |
The pre-computed radial statistics for the GLOBAL background. |
pix_in_peak_map |
std::vector< std::uint8_t > & |
Registry holding pixels in each candidate peak. |
infs |
std::vector< int > & |
Buffer for tracking peak pixels in the fast-scan axis. |
inss |
std::vector< int > & |
Buffer for tracking peak pixels in the slow-scan axis. |
peak_pixels |
std::vector< int > & |
The pixels in the peak. |
width |
int |
The width of the image (fast-scan axis). |
height |
int |
The height of the image (slow-scan axis). |
min_pixel_count |
long |
The minimum number of pixels to allow in a peak. |
max_pixel_count |
long |
The maximum number of pixels to allow in a peak. |
local_background_radius |
int |
The radius, around a peak candidate, to use for the local background calculations. |
max_number_peaks |
int |
The maximum number of peaks to find. |
min_SNR |
float |
The minimum peak candidate signal-to-noise ratio to allow. |