Prepare Calibration Data from a Folder
prepare_calibration.RdConvience function for preparing GLS logger data for light data calibration. Uses process_folder() in calibration mode to handle a directory of light data. See 'process_folder()' for more details.
Custom settings can be provided using filter_setting_list. For the creation of an empty filter settings template see create_filter_settings_file().
If export_calibration_template is TRUE, it will export an empty calibration sheet using 'calibration_to_wb()'.
Usage
prepare_calibration(
import_directory,
metadata,
all_colony_info,
output_directory,
show_filter_plots = FALSE,
export_calibration_template = TRUE,
filter_setting_list = seatrackRgls::seatrack_settings_list
)Arguments
- import_directory
Directory containing raw light data files. These are expected to be named in the format
<logger_id>_<year_retrieved>_<logger_model>, e.g.C23_2015_mk4083- metadata
A data frame containing calibration data for all loggers or a string providing a filepath to read this data from. This can be from an excel file, CSV file or a directory containing multiple calibration files. This dataframe can consist of a single row per logger/year combination, with the following columns
logger_id,species,colony,date_deployedanddate_retrieved. Providinglogger_modelis strongly advised. These will be automatically split into time windows, using theyear_splitsetting (defaulting to "06-01" in all 'seatrack_settings_list'). Alternatively, custom time windows can be provided by including columnsstart_datetimeandend_datetime, with one time window per row.- all_colony_info
A data frame containing colony information for all loggers (one row per colony). The required columns are
colony,latitude, andlongitude.- output_directory
Directory to save calibration templates and calibration plots. If
show_filter_plotsisTRUE- show_filter_plots
A logical indicating whether to show individual filter plots for the default sun angle. Defaults to
FALSE.- export_calibration_template
When
TRUEwill export a calibration template in excel format. Otherwise returns the calibration template as an R object. Defaults toTRUE.- filter_setting_list
A 'GLSFilterSettingsList' object containing filter settings for loggers or a path to load one using
read_filter_file(). Defaults to 'seatrackRgls::seatrack_settings_list'.