Data File(s) | Type | Description | Action |
---|---|---|---|
940735_v1_depalldata.csv (50.06 KB) | Comma Separated Values (.csv) | Primary data file for dataset ID 940735, version 1 | |
Supplemental File(s) | Type | Description | Action |
MATLABscripts/FTC_2_data_processing.m (10.78 KB) | MATLAB Programming Script (.m) | This script plots HOBO data from flow-through chamber setup (ambient and each of the 5 chambers) and calculates sediment oxygen demand (SOD). The user can select to either auto-calculate or manually calculate SOD. Whichever method is chosen, this process must be done for each of the chambers, changing variable names to append data as you go. Data is not imported through the code, since some format changes must be made and it is easier to do so through the Matlab file importer tool. It is advised that users run the script in sections demarcated within the script to check proper functioning of code and array format. Once the data files have been imported to the workspace, the sections, in order, perform the following: FORMAT CHAMBER DATA - separates chamber and ambient HOBO DO logger data files into separate Date&Time, Dissolved Oxygen, Elapsed Time, and Temperature vectors Plotting - below sections perform identical functions as in FTC_1_viewdata script, necessary for point selection if using manual calculate method PLOT AMBIENT DO DATA (CHANGE SUNRISE/SUNSET INDICES IF NEEDED) PLOT FTC_LOG DATA AS VERTICAL LINES PLOT SELECT CHAMBER DO DATA OVER AMBIENT DO DATA AND REFORMAT DandT ADD LEGEND SOD AUTO-CALCULATE – this section extracts DO slopes and auto-calculates SOD using supplied information about the chamber system incubation interval. Annotation about what variables need to be modified for correct functioning of the section is provided in the script. Note that this method of SOD calculation is not discerning but it is fast. SOD MANUAL CALCULATE – This section allows you to manually select points and calculate slope and SOD data. To do this, you must have generated a plot with the data using the plotting sections above. Execute each section individually following the steps. Make sure you select the correct cell to write data in Step 4, or run Prep Step to reset "Row" to selected value if starting from beginning of trial. | |
MATLABscripts/FTC_3_data_filtration.m (11.36 KB) | MATLAB Programming Script (.m) | This script takes the output from the previous script (FTC_2_data_processing) and filters out SOD data according to certain thresholds - lower limit of oxygen depletion as percent dissolved oxygen, lower useable time limit, a positive slope, and r-squared value. IMPORT AND FORMAT CHAMBER AND AMBIENT DATA – same function as previous scripts Following sections must be run sequentially for each chamber, changing variable names each time through for each chamber. PULL ALL CHAMBER DATA – change which chamber you are analyzing here, and pull data into variables FILTER CHAMBER DATA BY THRESHOLDS – filters SOD incubations by the above stated criteria, saves indices of incubations that “succeed” on each of the criteria, and assembles into vector of indices for incubations that succeeded on all criteria. SUBSET CHAMBER DATA THAT MEET THRESHOLD – finds corresponding incubation start times and SOD values for all incubations that met all filter criteria PULL INDICES OF THRESHOLDED DATA FROM EACH OF THE CHAMBERS – shuttles extracted data into variables named for each chamber. Must change variable suffix for the corresponding chamber here to avoid overwriting. ONCE THRESHOLDED VALUES HAVE BEEN FOUND,… - rewrites variables to placeholder variable for plotting PLOT AMBIENT DO AND SOD OVER TIME (CAN ALSO PLOT CHAMBER DO IF NEEDED) – plots ambient DO and only those SOD values that met all filter criteria. Note sunset and sunrise indices may need changing. EXTRACTS AND PLOTS SYMBOLS FOR EXCLUDED SOD VALUES – symbol types are differentiated by which filter criteria were failed for a given incubation. FIND MEAN OF SOD AT EACH TIMEPOINT (AND STD DEV AND n) – averages and finds variance and sample size of SOD across chambers at each incubation timepoint. Because of filter criteria some timepoints may have few or no data to average. EXTRACT INITIAL DO DATA – Finds and extracts the initial DO values for all the incubations that met the filter criteria. Must be done for each chamber. The resulting variable, InitialDO_used, will be used in the next script FTC_4_data_consolidation | |
MATLABscripts/FTC_1_viewdata.m (5.00 KB) | MATLAB Programming Script (.m) | Script to view flow-through chamber data and relevant environmental parameters. Data is not imported through the code, since some format changes must be made and it is easier to do so through the Matlab file importer tool. It is advised that users run the script in sections demarcated within the script to check proper functioning of code and array format. Once the data files have been imported to the workspace, the sections, in order, perform the following: FORMAT CHAMBER & AMBIENT DATA – separates chamber and ambient HOBO DO logger data files into separate Date&Time, Dissolved Oxygen, and Temperature variables Plotting data from deployments PLOT AMBIENT DO DATA FOR DEPLOYMENTS (CHANGE SUNRISE/SUNSET INDICES IF NEEDED) – creates a plot of the data for initial viewing and inspection for patterns. The sunrise/sunset indices must be directly input to create a shaded box on the plot denoting nighttime hours. PLOT SELECT CHAMBER DO DATA OVER AMBIENT DO DATA AND REFORMAT DandT – this is useful for looking more closely to see if the DO data for a given chamber more or less follows the ambient DO. If the chamber DO after flushing does not match the ambient DO, there is likely an issue with the chamber not flushing sufficiently. PLOT AMBIENT TEMP DATA (IF NEEDED) – run this directly after the previous section to plot temperature measured by the ambient HOBO DO logger on the right axis of the same plot. PLOT CHAMBER TEMP DATA (IF NEEDED) – same as above but for the chamber HOBO DO logger PLOT FTC_LOG DATA AS VERTICAL LINES – adds vertical lines denoting each time the chamber system flushed the overlying water in the chamber. Helpful for checking for sawtooth pattern more easily. ADD LEGEND – adds a legend for all of the added elements | |
MATLABscripts/FTC_4_data_consolidation.m (2.77 KB) | MATLAB Programming Script (.m) | This script reorganizes and consolidates sediment oxygen demand (SOD) and Ambient data from a given deployment into separate tables named for the associated deployment. Must be run for each deployment separately. MAKE AMBIENT TABLE – makes a new table for ambient HOBO DO data with each row a DO measurement and the columns the date and time in matlab datetime format (DandT), the elapsed time from the start of the deployment (dayfrac), the raw DO measurement (DO), a DO value after smoothing with a moving average (DOsmoothed), and the temperature (Temp) MAKE SOD VALUES TABLE – compiles filtered SOD values from all chambers in a given deployment into a single table. Remember to change the deployment number in the table name when running for each deployment. MAKE MEAN, STDEV AND NUMBER OF VALUES TABLE – makes separate table with SOD average for each timepoint and variance and sample size data Once generated, transfer these tables (ambient, data and summary) into a separate workspace with all the consolidated data from all deployments and save the workspace. This workspace and these tables will be used in the next script, FTC_5_data_analysis. | |
MATLABscripts/FTC_5_data_analysis.m (16.85 KB) | MATLAB Programming Script (.m) | Script for consolidated data analysis using three tables from each deployment. Sections should be run independently. Made a table called DepAllData that contains the combined data tables from all of the deployments. Added a column to the table denoting a sample number. Samples numbered in ascending deployment and chamber order. All incubations from the same chamber in the same deployment have the same sample number. Also added a column with biomass, standardized to individuals per meter squared, for each row. The biomass is the same for each incubation from a given chamber in a given deployment. Regressions PLOT ALL INITIAL DO VS SOD – pulls data from all deployments to plot initial DO vs SOD as scatterplot, colorized by biomass Compute Linear regression for each chamber, put plotting data into table – the resulting table named regr_table will be referenced for calculated values to plot regression lines Plot regressions on top of scatter – uses points in regr_table to plot regression lines for each chamber, colorized by biomass PLOT SLOPES VS FAUNAL BIOMASS – plots a regression of initial DO/SOD slopes against biomass of fauna in the chambers PLOT SLOPES VS BIOMASS OF CERTAIN FAUNAL TAXA (CHANGE TAXON IN VARIABLES) - plots a regression of initial DO/SOD slopes against biomass of a specified faunal taxon. Taxon must be referenced from the InfaunaAndSOD_Agg table. PLOT SLOPES VS FAUNAL ABUNDANCE – similar to above, plots a regression of initial DO/SOD slopes against biomass of fauna in the chambers PLOT SLOPES VS ABUNDANCE OF CERTAIN FAUNAL TAXA (CHANGE TAXON IN VARIABLES) – similar to above, plots a regression of initial DO/SOD slopes against abundance of a specified faunal taxon REGRESSIONS OF SOD WITH DO AND FAUNAL BIOMASS AS PREDICTORS – simple regressions of each and multiple regression testing interactions LINEAR MIXED MODEL WITH ALL DATA – uses all data to run a linear mixed model and perform a likelihood ratio test to examine effects of Initial DO and faunal biomass on the model Smoothing Analysis These code sections perform the smoothing analysis that shows the amount of sub-diel variability in the SOD data. Iterative smoothing fit lines are generated for each of the chambers in each of the deployments and the residual sum of squares calculated, and then the RSS is plotted with changing smoothing span size. The following sections must be run for each chamber in each deployment in succession to build a table, rsstable, that is referenced to plot all patterns of changing RSS with increasing span size. SELECT DEPLOYMENT FOR ANALYSIS – this must be done to select data from a specific deployment SELECT CHAMBER AND EXTRACT DATA - selects one chamber for smoothing fit analysis PLOT SINGLE CHAMBER – plots to observe variability in raw data DETREND DATA, GENERATE TEST FITLINE AND PLOT – detrending is done by subtracting the SOD sample mean from each SOD measurement GENERATES ITERATIVE FIT LINES OF SHRINKING WINDOW SIZE – only does this for the selected chamber. This process must be done with each chamber in each deployment. PLOT ITERATIVE TREND – plots trendline generated in previous step. The plot is the residual sum of squares calculated for each span size. SAVE VALUES IN STRUCTURE – saves calculated residuals to a table, restable, and calculates RSS values with changing span size and saves to a table, rsstable The following sections extract information from the calculated trendlines and plots them against potentially informative parameters. PLOT ALL RESIDUAL SUM OF SQUARES TRENDS – plots the RSS trends with increasing span size from every chamber together on the same plot. Extract asymptote (avg RSS of span size over 20) Plot asymptote over biomass Calculate normalized residual sum of squares (RSS/maxRSS) Plot normalized RSS with span size Extract initial slope of normalized data (over first four span sizes, or up to span 7) Plot normalized initial slope over biomass |
Files
Type: Comma Separated Values (.csv)
Description: Primary data file for dataset ID 940735, version 1
Supplemental Files
Type: MATLAB Programming Script (.m)
Description: This script plots HOBO data from flow-through chamber setup (ambient and each of the 5 chambers) and calculates sediment oxygen demand (SOD). The user can select to either auto-calculate or manually calculate SOD. Whichever method is chosen, this process must be done for each of the chambers, changing variable names to append data as you go. Data is not imported through the code, since some format changes must be made and it is easier to do so through the Matlab file importer tool. It is advised that users run the script in sections demarcated within the script to check proper functioning of code and array format. Once the data files have been imported to the workspace, the sections, in order, perform the following: FORMAT CHAMBER DATA - separates chamber and ambient HOBO DO logger data files into separate Date&Time, Dissolved Oxygen, Elapsed Time, and Temperature vectors Plotting - below sections perform identical functions as in FTC_1_viewdata script, necessary for point selection if using manual calculate method PLOT AMBIENT DO DATA (CHANGE SUNRISE/SUNSET INDICES IF NEEDED) PLOT FTC_LOG DATA AS VERTICAL LINES PLOT SELECT CHAMBER DO DATA OVER AMBIENT DO DATA AND REFORMAT DandT ADD LEGEND SOD AUTO-CALCULATE – this section extracts DO slopes and auto-calculates SOD using supplied information about the chamber system incubation interval. Annotation about what variables need to be modified for correct functioning of the section is provided in the script. Note that this method of SOD calculation is not discerning but it is fast. SOD MANUAL CALCULATE – This section allows you to manually select points and calculate slope and SOD data. To do this, you must have generated a plot with the data using the plotting sections above. Execute each section individually following the steps. Make sure you select the correct cell to write data in Step 4, or run Prep Step to reset "Row" to selected value if starting from beginning of trial.
Type: MATLAB Programming Script (.m)
Description: This script takes the output from the previous script (FTC_2_data_processing) and filters out SOD data according to certain thresholds - lower limit of oxygen depletion as percent dissolved oxygen, lower useable time limit, a positive slope, and r-squared value. IMPORT AND FORMAT CHAMBER AND AMBIENT DATA – same function as previous scripts Following sections must be run sequentially for each chamber, changing variable names each time through for each chamber. PULL ALL CHAMBER DATA – change which chamber you are analyzing here, and pull data into variables FILTER CHAMBER DATA BY THRESHOLDS – filters SOD incubations by the above stated criteria, saves indices of incubations that “succeed” on each of the criteria, and assembles into vector of indices for incubations that succeeded on all criteria. SUBSET CHAMBER DATA THAT MEET THRESHOLD – finds corresponding incubation start times and SOD values for all incubations that met all filter criteria PULL INDICES OF THRESHOLDED DATA FROM EACH OF THE CHAMBERS – shuttles extracted data into variables named for each chamber. Must change variable suffix for the corresponding chamber here to avoid overwriting. ONCE THRESHOLDED VALUES HAVE BEEN FOUND,… - rewrites variables to placeholder variable for plotting PLOT AMBIENT DO AND SOD OVER TIME (CAN ALSO PLOT CHAMBER DO IF NEEDED) – plots ambient DO and only those SOD values that met all filter criteria. Note sunset and sunrise indices may need changing. EXTRACTS AND PLOTS SYMBOLS FOR EXCLUDED SOD VALUES – symbol types are differentiated by which filter criteria were failed for a given incubation. FIND MEAN OF SOD AT EACH TIMEPOINT (AND STD DEV AND n) – averages and finds variance and sample size of SOD across chambers at each incubation timepoint. Because of filter criteria some timepoints may have few or no data to average. EXTRACT INITIAL DO DATA – Finds and extracts the initial DO values for all the incubations that met the filter criteria. Must be done for each chamber. The resulting variable, InitialDO_used, will be used in the next script FTC_4_data_consolidation
Type: MATLAB Programming Script (.m)
Description: Script to view flow-through chamber data and relevant environmental parameters. Data is not imported through the code, since some format changes must be made and it is easier to do so through the Matlab file importer tool. It is advised that users run the script in sections demarcated within the script to check proper functioning of code and array format. Once the data files have been imported to the workspace, the sections, in order, perform the following: FORMAT CHAMBER & AMBIENT DATA – separates chamber and ambient HOBO DO logger data files into separate Date&Time, Dissolved Oxygen, and Temperature variables Plotting data from deployments PLOT AMBIENT DO DATA FOR DEPLOYMENTS (CHANGE SUNRISE/SUNSET INDICES IF NEEDED) – creates a plot of the data for initial viewing and inspection for patterns. The sunrise/sunset indices must be directly input to create a shaded box on the plot denoting nighttime hours. PLOT SELECT CHAMBER DO DATA OVER AMBIENT DO DATA AND REFORMAT DandT – this is useful for looking more closely to see if the DO data for a given chamber more or less follows the ambient DO. If the chamber DO after flushing does not match the ambient DO, there is likely an issue with the chamber not flushing sufficiently. PLOT AMBIENT TEMP DATA (IF NEEDED) – run this directly after the previous section to plot temperature measured by the ambient HOBO DO logger on the right axis of the same plot. PLOT CHAMBER TEMP DATA (IF NEEDED) – same as above but for the chamber HOBO DO logger PLOT FTC_LOG DATA AS VERTICAL LINES – adds vertical lines denoting each time the chamber system flushed the overlying water in the chamber. Helpful for checking for sawtooth pattern more easily. ADD LEGEND – adds a legend for all of the added elements
Type: MATLAB Programming Script (.m)
Description: This script reorganizes and consolidates sediment oxygen demand (SOD) and Ambient data from a given deployment into separate tables named for the associated deployment. Must be run for each deployment separately. MAKE AMBIENT TABLE – makes a new table for ambient HOBO DO data with each row a DO measurement and the columns the date and time in matlab datetime format (DandT), the elapsed time from the start of the deployment (dayfrac), the raw DO measurement (DO), a DO value after smoothing with a moving average (DOsmoothed), and the temperature (Temp) MAKE SOD VALUES TABLE – compiles filtered SOD values from all chambers in a given deployment into a single table. Remember to change the deployment number in the table name when running for each deployment. MAKE MEAN, STDEV AND NUMBER OF VALUES TABLE – makes separate table with SOD average for each timepoint and variance and sample size data Once generated, transfer these tables (ambient, data and summary) into a separate workspace with all the consolidated data from all deployments and save the workspace. This workspace and these tables will be used in the next script, FTC_5_data_analysis.
Type: MATLAB Programming Script (.m)
Description: Script for consolidated data analysis using three tables from each deployment. Sections should be run independently. Made a table called DepAllData that contains the combined data tables from all of the deployments. Added a column to the table denoting a sample number. Samples numbered in ascending deployment and chamber order. All incubations from the same chamber in the same deployment have the same sample number. Also added a column with biomass, standardized to individuals per meter squared, for each row. The biomass is the same for each incubation from a given chamber in a given deployment. Regressions PLOT ALL INITIAL DO VS SOD – pulls data from all deployments to plot initial DO vs SOD as scatterplot, colorized by biomass Compute Linear regression for each chamber, put plotting data into table – the resulting table named regr_table will be referenced for calculated values to plot regression lines Plot regressions on top of scatter – uses points in regr_table to plot regression lines for each chamber, colorized by biomass PLOT SLOPES VS FAUNAL BIOMASS – plots a regression of initial DO/SOD slopes against biomass of fauna in the chambers PLOT SLOPES VS BIOMASS OF CERTAIN FAUNAL TAXA (CHANGE TAXON IN VARIABLES) - plots a regression of initial DO/SOD slopes against biomass of a specified faunal taxon. Taxon must be referenced from the InfaunaAndSOD_Agg table. PLOT SLOPES VS FAUNAL ABUNDANCE – similar to above, plots a regression of initial DO/SOD slopes against biomass of fauna in the chambers PLOT SLOPES VS ABUNDANCE OF CERTAIN FAUNAL TAXA (CHANGE TAXON IN VARIABLES) – similar to above, plots a regression of initial DO/SOD slopes against abundance of a specified faunal taxon REGRESSIONS OF SOD WITH DO AND FAUNAL BIOMASS AS PREDICTORS – simple regressions of each and multiple regression testing interactions LINEAR MIXED MODEL WITH ALL DATA – uses all data to run a linear mixed model and perform a likelihood ratio test to examine effects of Initial DO and faunal biomass on the model Smoothing Analysis These code sections perform the smoothing analysis that shows the amount of sub-diel variability in the SOD data. Iterative smoothing fit lines are generated for each of the chambers in each of the deployments and the residual sum of squares calculated, and then the RSS is plotted with changing smoothing span size. The following sections must be run for each chamber in each deployment in succession to build a table, rsstable, that is referenced to plot all patterns of changing RSS with increasing span size. SELECT DEPLOYMENT FOR ANALYSIS – this must be done to select data from a specific deployment SELECT CHAMBER AND EXTRACT DATA - selects one chamber for smoothing fit analysis PLOT SINGLE CHAMBER – plots to observe variability in raw data DETREND DATA, GENERATE TEST FITLINE AND PLOT – detrending is done by subtracting the SOD sample mean from each SOD measurement GENERATES ITERATIVE FIT LINES OF SHRINKING WINDOW SIZE – only does this for the selected chamber. This process must be done with each chamber in each deployment. PLOT ITERATIVE TREND – plots trendline generated in previous step. The plot is the residual sum of squares calculated for each span size. SAVE VALUES IN STRUCTURE – saves calculated residuals to a table, restable, and calculates RSS values with changing span size and saves to a table, rsstable The following sections extract information from the calculated trendlines and plots them against potentially informative parameters. PLOT ALL RESIDUAL SUM OF SQUARES TRENDS – plots the RSS trends with increasing span size from every chamber together on the same plot. Extract asymptote (avg RSS of span size over 20) Plot asymptote over biomass Calculate normalized residual sum of squares (RSS/maxRSS) Plot normalized RSS with span size Extract initial slope of normalized data (over first four span sizes, or up to span 7) Plot normalized initial slope over biomass