This function generates a plot for a given sample from Particle Size Distribution (PSD) data and fits from Imaging FlowCytobot (IFCB).
The PSD data and fits can be generated by ifcb_psd
(Hayashi et al. in prep).
Arguments
- sample_name
The name of the sample to plot in DYYYYMMDDTHHMMSS.
- data
A data frame containing the PSD data (data output from
ifcb_psd
), where each row represents a sample and each column represents different particle sizes in micrometers.- fits
A data frame containing the fit parameters for the power curve (fits output from
ifcb_psd
), where each row represents a sample and the columns include the parametersa
,k
, andR2
.- start_fit
The x-value threshold below which data should be excluded from the plot and fit.
References
Hayashi, K., Walton, J., Lie, A., Smith, J. and Kudela M. Using particle size distribution (PSD) to automate imaging flow cytobot (IFCB) data quality in coastal California, USA. In prep.
Examples
if (FALSE) { # \dontrun{
# Analyze PSD
psd <- ifcb_psd(feature_folder = 'path/to/features',
hdr_folder = 'path/to/hdr_data',
save_data = TRUE,
output_file = 'psd/svea_2021',
plot_folder = NULL,
use_marker = FALSE,
start_fit = 13,
r_sqr = 0.5,
beads = 10 ** 9,
bubbles = 150,
incomplete = c(1500, 3),
missing_cells = 0.7,
biomass = 1000,
bloom = 5,
humidity = NULL)
# Plot PSD of the first sample
plot <- ifcb_psd_plot(sample_name = "D20230316T101514",
data = psd$data,
fits = psd$fits,
start_fit = 10)
# Inspect plot
print(plot)
} # }