Quality control and data processing scripts for the California IFCB network. Before running the scripts, download files from the IFCB dashboard if you do not already have them stored on your local machine.
Semi-automated quality control for IFCB sample data. Change the following variables in the USER INPUTS section before running the script:
- IFCB_id: should match your instrument, e.g., 163 for Bodega Marine Lab
- sample_date: date you want to QC (can only do one day at a time)
- loc: location of IFCB files in local directory
- flag_loc: location to write QC flag data to
- metadata_loc: location to write metadata.csv file to before copying it to the IFCB computer
When you are done with QC, copy the metadata.csv file to the appropriate directory location on the IFCB computer so that it will get uploaded to the IFCB dashboard the next time rsync is run on the IFCB computer. If you want to run the script on a machine running Windows OS, use IFCB_QC_share_WindowsOS instead of IFCB_QC_share.
Variables that specify which IFCB sample to QC and its directory location.
Calls a user-defined function, get_data_IFCB, to locate all of the sample files for the user-specified date. Once the files have been located, the script begins to loop through them one sample at a time for the specified date.
Extracts relevant QC parameters from .adc and .hdr files, prints a summary to the command window, and plots ROIy vs. ROIx for the sample.
Checks each sample to see if the sample volume, run time, images-to-triggers ratio, and humidity exceed certain thresholds and flags the sample if one or more do.
Writes the flags to a .csv file associated with a particular IFCB instrument. This file is continuosly updated as you run through the samples.
If a sample is flagged for failing one or more of the QC checks, it is assigned a skip flag, which is recorded to the metadata.csv file associated with a particular IFCB instrument. This is the file that gets uploaded to the IFCB dashboard.
Asks the user if they want to continue on to the next sample if a skip flag was generated.