Process Positions from a Folder
process_positions.RdConvience function for processing GLS logger data using provided calibration values. Uses 'process_folder()' to process a folder 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()'
Usage
process_positions(
import_directory = NULL,
light_data_list = NULL,
calibration_data,
all_colony_info,
output_directory,
extra_metadata = NULL,
filter_setting_list = seatrackRgls::seatrack_settings_list,
show_filter_plots = TRUE,
do_seasonal_calibration = NULL,
stop_on_error = FALSE
)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- light_data_list
A named list of data frames containing light data for each logger/year combination. List names are assumed to be logger serial numbers. If not provided, light data will be loaded from the import directory based on the logger ID and year.
- calibration_data
Data frame containing calibration data for loggers or a path pointing to the calibration data, as created by prepare_calibration().
- 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 processed position outputs, plots etc.
- extra_metadata
Optional data frame containing extra metadata for loggers. This must have the column
logger_idto join extra metadata. Ayear_retrievedcolumn can also be provided to join based on a combination of logger and which session this is.- filter_setting_list
A 'GLSFilterSettingsList' object containing filter settings for loggers or a path to load one using 'read_filter_file()'. Defaults to 'seatrack_settings_list'.
- show_filter_plots
A logical indicating whether to show individual filter plots for the default sun angle. Defaults to
TRUE.- do_seasonal_calibration
A logical indicating whether to perform seasonal calibration. Defaults to NULL, which uses the filter_settings_list.
- stop_on_error
A logical indicating whether to stop processing if an error occurs. Defaults to FALSE. If TRUE, if an error occurs during processing of a logger/year combination, the function will stop and return an error message. If FALSE, the function will continue processing remaining logger/year combinations and will print a message indicating which logger/year combinations had errors.