create_PSD_one_file: Create particle size distribution as particle counts and Qc...

View source: R/psd.R

create_PSD_one_fileR Documentation

Create particle size distribution as particle counts and Qc sums for one VCT file

Description

Create particle size distribution as particle counts and Qc sums for one VCT file

Usage

create_PSD_one_file(
  vct_file,
  quantile,
  refracs,
  grid,
  log_base = NULL,
  max_boundary_proportion = NULL,
  ignore_dates = NULL,
  pop = NULL,
  use_data.table = TRUE
)

Arguments

vct_file

VCT file path.

quantile

OPP filtering quantile.

refracs

Dataframe of refractive indices to use for each population. Column names should be population names used in classification, values should be mid, lwr, upr.

grid

Named list of break points to use for gridding. Names should be fsc_small, pe, chl_small, Qc, diam.

log_base

If the break points are logged values, provide the base here to properly log the VCT data before gridding. If break points are not log use NULL.

max_boundary_proportion

Proportion of particles in each VCT file which can be removed as boundary points before discarding all data in the file. Should be > 0 and <= 1. If this parameter is NULL, no boundary points will be removed before gridding.

ignore_dates

Don't process VCT data with these dates.

pop

A single population label to keep. Particles not matching this label will be ignored.

use_data.table

Use data.table for performance speedup, otherwise use dplyr.

Value

Tibble of gridded data, grouped by date, fsc_small, pe, chl_small, Qc diam grid locations, and population. Each grid coordinate is an integer index into the corresponding grid breaks vector. The break point at that location defines the inclusive lower bound of the bin, and the next break point in the sequence defines the exclusive upper bound. Data columns summarizing each group are n for particle count and Qc_sum for the the sum of Qc. Return NULL if not data remains after removing boundary points, filtering by ignore_dates, or filtering by population.


armbrustlab/popcycle documentation built on April 1, 2024, 2:41 p.m.