# CTDFjorder
CTDFjorder is a Python package for processing and analyzing CTD (Conductivity, Temperature, Depth) data.
Documentation: [Read the docs](https://nikothomas.github.io/CTDFjorder/CTDFjorder/CTDFjorder.html)
GUI Wrapper: [ctdfjorder-lite](https://github.com/nikothomas/ctdfjorder-lite)
## Features
- Read RSK files and extract CTD data
- Process CTD data, including removing non-positive samples and cleaning data
- Calculate derived quantities such as absolute salinity, density, and overturns
- Determine mixed layer depth (MLD) using different methods
- Generate plots for visualizing CTD profiles and derived quantities
- Command-line interface (CLI) for easy processing and merging of RSK files
## Installation
It's recommended that you create a new environment just for CTDFjorder. This can be done in conda with the following
command.
```shell
conda create --name ctdfjorder -c conda-forge python=3.11
conda activate ctdfjorder
```
To install CTDFjorder you can use pip:
```shell
pip install ctdfjorder
```
## Usage
CTDFjorder provides a command-line interface (CLI) for processing and analyzing CTD data. Here are the available commands:
### Process a single RSK file
```shell
ctdfjorder-cli process <file>
```
This command processes a single RSK file specified by `<file>`. It performs various steps like adding filename to the CTD data table, saving data to a CSV file, adding location information, removing non-positive samples, etc.
### Merge all RSK files in the current folder
```shell
ctdfjorder-cli merge
```
This command merges all RSK files found in the current folder. It adds filename and location information to the data table and saves the data to a CSV file.
### Run the default processing pipeline
```shell
ctdfjorder-cli default
```
This command runs the default processing pipeline on all RSK files found in the current folder. It performs the same steps as the `process` command for each RSK file.
## Configuration
CTDFjorder looks for a master sheet Excel file named "FjordPhyto MASTER SHEET.xlsx" in the current working directory. This file is used for estimating location information when it's not available in the RSK files. You can change this by modifying the CTDFjorder.master_sheet_path field to the name of your own spreadsheet.
## Examples
Here are a few examples of how to use CTDFjorder:
- Process a single RSK file:
```shell
ctdfjorder-cli process path/to/rskfile.rsk
```
- Merge all RSK files in the current folder:
```shell
ctdfjorder-cli merge
```
- Run the default processing pipeline on all RSK files in the current folder:
```shell
ctdfjorder-cli default
```
- Write your own script:
```
from CTDFjorder import CTDFjorder
import os
for file in CTDFjorder.get_rsk_filenames_in_dir(os.getcwd()):
try:
my_data = CTDFjorder.CTD(file)
my_data.add_filename_to_table()
my_data.save_to_csv("output.csv")
my_data.add_location_to_table()
my_data.remove_non_positive_samples()
my_data.clean("practicalsalinity", 'salinitydiff')
my_data.add_absolute_salinity()
my_data.add_density()
my_data.add_overturns()
my_data.add_mld(1)
my_data.add_mld(5)
my_data.save_to_csv("outputclean.csv")
my_data.plot_depth_density_salinity_mld_scatter()
my_data.plot_depth_temperature_scatter()
my_data.plot_depth_salinity_density_mld_line()
except Exception as e:
print(f"Error processing file: '{file}' {e}")
continue
```
## Contributing
Contributions to CTDFjorder are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/nikothomas/CTDFjorder).
## License
CTDFjorder is released under the MIT License.
## Acknowledgments
CTDFjorder was developed by Nikolas Yanek-Chrones for the Fjord Phyto project. The gsw library was used for certain dervied calculations.
## Citations
McDougall, T. J., & Barker, P. M. (2011). Getting started with TEOS-10 and the Gibbs Seawater (GSW) Oceanographic Toolbox. SCOR/IAPSO WG127.
Raw data
{
"_id": null,
"home_page": "https://github.com/nikothomas/CTDFjorder",
"name": "CTDFjorder",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "CTD",
"author": "Nikolas Yanek-Chrones",
"author_email": "nikojb1001@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/47/44/8a08b77384e46800632f1f7f681193551fad3554c2370a1f934f167a7e4a/ctdfjorder-0.0.43.tar.gz",
"platform": null,
"description": "# CTDFjorder\n\nCTDFjorder is a Python package for processing and analyzing CTD (Conductivity, Temperature, Depth) data.\nDocumentation: [Read the docs](https://nikothomas.github.io/CTDFjorder/CTDFjorder/CTDFjorder.html)\nGUI Wrapper: [ctdfjorder-lite](https://github.com/nikothomas/ctdfjorder-lite)\n\n## Features\n\n- Read RSK files and extract CTD data\n- Process CTD data, including removing non-positive samples and cleaning data\n- Calculate derived quantities such as absolute salinity, density, and overturns\n- Determine mixed layer depth (MLD) using different methods\n- Generate plots for visualizing CTD profiles and derived quantities\n- Command-line interface (CLI) for easy processing and merging of RSK files\n\n## Installation\nIt's recommended that you create a new environment just for CTDFjorder. This can be done in conda with the following\ncommand.\n```shell\nconda create --name ctdfjorder -c conda-forge python=3.11\nconda activate ctdfjorder\n```\nTo install CTDFjorder you can use pip:\n```shell\npip install ctdfjorder\n```\n\n## Usage\n\nCTDFjorder provides a command-line interface (CLI) for processing and analyzing CTD data. Here are the available commands:\n\n### Process a single RSK file\n\n```shell\nctdfjorder-cli process <file>\n```\n\nThis command processes a single RSK file specified by `<file>`. It performs various steps like adding filename to the CTD data table, saving data to a CSV file, adding location information, removing non-positive samples, etc.\n\n### Merge all RSK files in the current folder\n\n```shell\nctdfjorder-cli merge\n```\n\nThis command merges all RSK files found in the current folder. It adds filename and location information to the data table and saves the data to a CSV file.\n\n### Run the default processing pipeline\n\n```shell\nctdfjorder-cli default\n```\n\nThis command runs the default processing pipeline on all RSK files found in the current folder. It performs the same steps as the `process` command for each RSK file.\n\n## Configuration\n\nCTDFjorder looks for a master sheet Excel file named \"FjordPhyto MASTER SHEET.xlsx\" in the current working directory. This file is used for estimating location information when it's not available in the RSK files. You can change this by modifying the CTDFjorder.master_sheet_path field to the name of your own spreadsheet.\n\n## Examples\n\nHere are a few examples of how to use CTDFjorder:\n\n- Process a single RSK file:\n\n```shell\nctdfjorder-cli process path/to/rskfile.rsk\n```\n\n- Merge all RSK files in the current folder:\n\n```shell\nctdfjorder-cli merge\n```\n\n- Run the default processing pipeline on all RSK files in the current folder:\n\n```shell\nctdfjorder-cli default\n```\n\n- Write your own script:\n```\nfrom CTDFjorder import CTDFjorder\nimport os\nfor file in CTDFjorder.get_rsk_filenames_in_dir(os.getcwd()):\n try:\n my_data = CTDFjorder.CTD(file)\n my_data.add_filename_to_table()\n my_data.save_to_csv(\"output.csv\")\n my_data.add_location_to_table()\n my_data.remove_non_positive_samples()\n my_data.clean(\"practicalsalinity\", 'salinitydiff')\n my_data.add_absolute_salinity()\n my_data.add_density()\n my_data.add_overturns()\n my_data.add_mld(1)\n my_data.add_mld(5)\n my_data.save_to_csv(\"outputclean.csv\")\n my_data.plot_depth_density_salinity_mld_scatter()\n my_data.plot_depth_temperature_scatter()\n my_data.plot_depth_salinity_density_mld_line()\n except Exception as e:\n print(f\"Error processing file: '{file}' {e}\")\n continue\n```\n\n## Contributing\n\nContributions to CTDFjorder are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/nikothomas/CTDFjorder).\n\n## License\n\nCTDFjorder is released under the MIT License.\n\n## Acknowledgments\n\nCTDFjorder was developed by Nikolas Yanek-Chrones for the Fjord Phyto project. The gsw library was used for certain dervied calculations.\n\n## Citations\nMcDougall, T. J., & Barker, P. M. (2011). Getting started with TEOS-10 and the Gibbs Seawater (GSW) Oceanographic Toolbox. SCOR/IAPSO WG127.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A package for processing and analyzing CTD data.",
"version": "0.0.43",
"project_urls": {
"Homepage": "https://github.com/nikothomas/CTDFjorder",
"Issues": "https://github.com/nikothomas/CTDFjorder/issues"
},
"split_keywords": [
"ctd"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3a38d716f60c881525e57b90092f7010699029324e8d7d9e50b947f37eef5c22",
"md5": "6434c48be65b619fdb7cc3e660c592d3",
"sha256": "17adae538b38f854f3ac315c7dda839f8e0e42bf4effb379a48c327860b797e9"
},
"downloads": -1,
"filename": "CTDFjorder-0.0.43-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6434c48be65b619fdb7cc3e660c592d3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 15964,
"upload_time": "2024-05-07T23:08:01",
"upload_time_iso_8601": "2024-05-07T23:08:01.697093Z",
"url": "https://files.pythonhosted.org/packages/3a/38/d716f60c881525e57b90092f7010699029324e8d7d9e50b947f37eef5c22/CTDFjorder-0.0.43-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "47448a08b77384e46800632f1f7f681193551fad3554c2370a1f934f167a7e4a",
"md5": "aef50668f2e9a66a78d1a8c64ac7eb4d",
"sha256": "141d3f300662347c177d06b06d2d5f4c83ff56b6776160e722b6d95357a71072"
},
"downloads": -1,
"filename": "ctdfjorder-0.0.43.tar.gz",
"has_sig": false,
"md5_digest": "aef50668f2e9a66a78d1a8c64ac7eb4d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 15427,
"upload_time": "2024-05-07T23:08:03",
"upload_time_iso_8601": "2024-05-07T23:08:03.654652Z",
"url": "https://files.pythonhosted.org/packages/47/44/8a08b77384e46800632f1f7f681193551fad3554c2370a1f934f167a7e4a/ctdfjorder-0.0.43.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-07 23:08:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nikothomas",
"github_project": "CTDFjorder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ctdfjorder"
}