ManualFlowgaugeProcessor¶
1. What is a Sontek FlowTracker2?¶
Link to manufacturers webpage: (https://www.xylem.com/en-uk/products--services/analytical-instruments-and-equipment/flowmeters-velocimeters/flowtracker2-handheld-adv/)
2. Extracting Survey Data¶
It is expected that when exporting flow gauging surveys off of the FT2, each survey is exported as a folder contaning the following files:
- 1x .ft file (redundant for this package)
- 1x .dis file
- 1x .sum file
- 1x .ctl file
- 1x .dat file
- 1x .pdf file (redundant for this package)
This is also the format that is expected from extract_sontekflowtracker_surveys.
Multiple unique survey files
If multiple of the same file type are found in a folder, the first one will be used and a warning that multiple files have been found will be displayed
The following extract function creates a list of SontekFlowTrackerSurvey class objects with high-level metadata and specific sub-files as attributes.
from flowgaugeprocessor.extract import extract_sontekflowtracker_surveys
path = "path_to_your_SontekFT2_survey_folders"
surveys = extract_sontekflowtracker_surveys(path)
3. Exporting Survey Data¶
If you simply want to export all of your survey data out into more standard file-formats, exporting single or grouped surveys will create either csv or parquet files contaning the data contained within the raw survey files.
Options for dataframe at the survey level:
"metadata": One row per survey. All survey metadata, location, datetime, equipment information; flow, depth and pre-check information"dis": One row per vertical. All vertical data, geolocation and flow information, readings from each of the three sensors"sum": One row per vertical. All vertical data, geolocation and flow information, more detailed readings from each of the three sensors"dat": One row per vertical. All vertical data, velocity and temperaoture information"ctl": One row per survey. Equipment set-up and configuration
3.1 Single Survey Export¶
Function to be added, creates all files mentioned above, 1x per survey.
3.2 Group Survey Export¶
For bulk exporting all extracted surveys in a single file, can be split back into individual surveys using the "site_id" and "site_name" columns.
from flowgaugeprocessor.extract import extract_sontekflowtracker_surveys
from flowgaugeprocessor.utils import export_group_survey_data
input_path = "path_to_your_SontekFT2_survey_folders"
output_path = "path_to_your_output_directory"
surveys = extract_sontekflowtracker_surveys(path)
export_group_survey_data(
surveys=surveys,
survey_type="SontekFT2",
dataframe="metadata",
export_path=out_path,
file_out_name="FT2 Metadata",
add_metadata=False,
file_type="csv")
export_group_survey_data(
surveys=surveys,
survey_type="SontekFT2",
dataframe="dis",
export_path=out_path,
file_out_name="FT2 Summary Data",
add_metadata=False,
file_type="csv")
export_group_survey_data(
surveys=surveys,
survey_type="SontekFT2",
dataframe="sum",
export_path=out_path,
file_out_name="FT2 Full Summary Data",
add_metadata=False,
file_type="csv")
export_group_survey_data(
surveys=surveys,
survey_type="SontekFT2",
dataframe="dat",
export_path=out_path,
file_out_name="FT2 Dat Data",
add_metadata=False,
file_type="csv")
export_group_survey_data(
surveys=surveys,
survey_type="SontekFT2",
dataframe="ctl",
export_path=out_path,
file_out_name="FT2 Config Data",
add_metadata=False,
file_type="csv")
3.3 Site Timeseries Export¶
Note: Function is a WIP as final format is being developed
To add: Option for file type, currently only parquet
For exporting a minimal timeseries file for each site surveted, contains:
"Discharge"- recorded in m³/s,"Mean-depth"- recorded in m,"Temperature"- recorded in °C,"Survey Type"- classified as"Flowstick"for the FT2
from flowgaugeprocessor.extract import extract_sontekflowtracker_surveys
from flowgaugeprocessor.fdri_timeseries_export import survey_to_fdri_timeseries
input_path = "path_to_your_SontekFT2_survey_folders"
output_path = "path_to_your_output_directory
surveys = extract_sontekflowtracker_surveys(path)
surveys_to_fdri_timeseries(surveys, output_path)
Combine Your Equipment
This function works with multiple survey types, try joining all your survey lists together and applying the function