From 6b0ee996618b924d9be0b98bc11749ec90db6655 Mon Sep 17 00:00:00 2001 From: Bousquin Date: Fri, 29 Sep 2023 21:11:58 -0500 Subject: [PATCH] Fromatting to fix doc warnings/errors from last commit --- harmonize_wq/convert.py | 20 ++++++++++-------- harmonize_wq/harmonize.py | 43 ++++++++++++++++++++------------------- harmonize_wq/visualize.py | 2 +- harmonize_wq/wq_data.py | 2 +- harmonize_wq/wrangle.py | 8 ++++---- 5 files changed, 39 insertions(+), 36 deletions(-) diff --git a/harmonize_wq/convert.py b/harmonize_wq/convert.py index e5b1205..95e48b9 100644 --- a/harmonize_wq/convert.py +++ b/harmonize_wq/convert.py @@ -595,15 +595,17 @@ def conductivity_to_PSU(val, References ---------- - IOC, SCOR and IAPSO, 2010: The international thermodynamic - equation of seawater – 2010: Calculation and use of thermodynamic - properties. Intergovernmental Oceanographic Commission, Manuals - and Guides No. 56, UNESCO (English), 196 pp - - code: Alan D. Jassby and James E. Cloern (2015). wq: Some tools for - exploring water quality monitoring data. R package v0.4.4. - See the wq::ec2pss function. - Function: https://github.com/jsta/cond2sal_shiny/blob/master/helpers.R + IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of + seawater – 2010: Calculation and use of thermodynamic properties. + Intergovernmental Oceanographic Commission, Manuals and Guides No. 56, + UNESCO (English), 196 pp. + + Alan D. Jassby and James E. Cloern (2015). wq: Some + tools for exploring water quality monitoring data. R package v0.4.4. + See the ec2pss function. + + Adapted from R `cond2sal_shiny + `_ Examples -------- diff --git a/harmonize_wq/harmonize.py b/harmonize_wq/harmonize.py index 818efd0..fc46307 100644 --- a/harmonize_wq/harmonize.py +++ b/harmonize_wq/harmonize.py @@ -328,33 +328,34 @@ def turbidity(wqp): Uses :class:`wq_data.WQCharData` to check units, check unit dimensionality and perform appropriate unit conversions + Notes + ----- See `USGS Report Chapter A6. Section 6.7. Turbidity - ` + `_ See ASTM D\315-17 for equivalent unit definitions: - 'NTU' - 400-680nm (EPA 180.1), range 0.0-40. - 'NTRU' - 400-680nm (2130B), range 0-10,000. - 'NTMU' - 400-680nm. - 'FNU' - 780-900nm (ISO 7027), range 0-1000. - 'FNRU' - 780-900nm (ISO 7027), range 0-10,000. - 'FAU' - 780-900nm, range 20-1000. + 'NTU' - 400-680nm (EPA 180.1), range 0.0-40. + 'NTRU' - 400-680nm (2130B), range 0-10,000. + 'NTMU' - 400-680nm. + 'FNU' - 780-900nm (ISO 7027), range 0-1000. + 'FNRU' - 780-900nm (ISO 7027), range 0-10,000. + 'FAU' - 780-900nm, range 20-1000. Older methods: - 'FTU' - lacks instrumentation specificity - 'SiO2' (ppm or mg/l) - concentration of calibration standard (=JTU) - 'JTU' - candle instead of formazin standard, near 40 NTU these may be - equivalent, but highly variable. - Conversions used: - cm <-> NTU see :func:`convert.cm_to_NTU` from - `USU ` + 'FTU' - lacks instrumentation specificity + 'SiO2' (ppm or mg/l) - concentration of calibration standard (=JTU) + 'JTU' - candle instead of formazin standard, near 40 NTU these may be + equivalent, but highly variable. + Conversions used: cm <-> NTU see :func:`convert.cm_to_NTU` from + `USU `_. Alternative conversions available but not currently used by default: - :func:`convert.FNU_to_NTU` from Gohin (2011) Ocean Sci., 7, 705–732 - ``. - :func:`convert.SiO2_to_NTU` linear relation from Otilia et al. 2013. - :func:`convert.JTU_to_NTU` linear relation from Otilia et al. 2013. + :func:`convert.FNU_to_NTU` from Gohin (2011) Ocean Sci., 7, 705–732 + ``_. + :func:`convert.SiO2_to_NTU` linear relation from Otilia et al. 2013. + :func:`convert.JTU_to_NTU` linear relation from Otilia et al. 2013. - Otilia, Rusănescu Carmen, Rusănescu Marin, and Stoica Dorel. - MONITORING OF PHYSICAL INDICATORS IN WATER SAMPLES. - ``. + Otilia, Rusănescu Carmen, Rusănescu Marin, and Stoica Dorel. + MONITORING OF PHYSICAL INDICATORS IN WATER SAMPLES. + ``_. Parameters ---------- diff --git a/harmonize_wq/visualize.py b/harmonize_wq/visualize.py index 260c35c..b648338 100644 --- a/harmonize_wq/visualize.py +++ b/harmonize_wq/visualize.py @@ -27,7 +27,7 @@ def print_report(results_in, out_col, unit_col_in, threshold=None): See Also -------- See any of the 'Detailed' notebooks found in - `demos`_ for + `demos `_ for examples of how this function is leveraged by the :func:`harmonize.harmonize_generic` report argument. diff --git a/harmonize_wq/wq_data.py b/harmonize_wq/wq_data.py index 9d51e78..f3ae091 100644 --- a/harmonize_wq/wq_data.py +++ b/harmonize_wq/wq_data.py @@ -31,7 +31,7 @@ class WQCharData(): Standard WQCharData.df column names for unit_in, unit_out, and measure. out_col : str Column name in df for results, set using char_val. - ureg : pint.UnitRegistry() + ureg : pint.UnitRegistry pint unit registry, initially standard unit registry. units : str Units all results in out_col column will be converted into. diff --git a/harmonize_wq/wrangle.py b/harmonize_wq/wrangle.py index ea10f2a..35b0b57 100644 --- a/harmonize_wq/wrangle.py +++ b/harmonize_wq/wrangle.py @@ -34,7 +34,7 @@ def split_table(df_in): Examples -------- See any of the 'Simple' notebooks found in - `demos`_ for + `demos `_ for examples of how this function is used to divide the table into columns of interest (main_df) and characteristic specific metadata (chars_df). @@ -78,7 +78,7 @@ def split_col(df_in, result_col='QA_flag', col_prefix='QA'): Examples -------- See any of the 'Simple' notebooks found in - `demos`_ for + `demo s`_ for examples of how this function is used to split the QA column into multiple characteristic specific QA columns. @@ -158,7 +158,7 @@ def collapse_results(df_in, cols=None): Examples -------- See any of the 'Simple' notebooks found in - `demos`_ for + `demos `_ for examples of how this function is used to combine rows with the same sample organization, activity, location, and datetime. @@ -699,7 +699,7 @@ def clip_stations(stations, aoi): def to_simple_shape(gdf, out_shp): """Simplify GeoDataFrame for better export to shapefile. - Adopts and adapts 'Simple' from `NWQMC/pywqp`_ + Adopts and adapts 'Simple' from `NWQMC/pywqp `_ See :func:`domains.stations_rename` for renaming of columns. Parameters