Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge: release 1.0.5 #10

Merged
merged 19 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ limitations under the License. -->

[![Pytest and Flake8](https://github.com/gampnico/scintillometry/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/gampnico/scintillometry/actions/workflows/python-app.yml)

Analyse data & 2D flux footprints from Scintec's BLS scintillometers.
Development branch: [![Pytest and Linting](https://github.com/gampnico/scintillometry/actions/workflows/python-app.yml/badge.svg?branch=develop)](https://github.com/gampnico/scintillometry/actions/workflows/python-app.yml)

This repository is a complete rewrite of gampnico/ss19-feldkurs. If you have any existing forks or local clones, **please delete them**. The legacy code no longer works. No user features will be lost, but rewriting may take some time. Contributions are always welcome.
Analyse data & 2D flux footprints from Scintec's BLS scintillometers.

This package started life as part of a field course. If you spot any missing citations or licenses please [open an issue](https://github.com/gampnico/scintillometry/issues).
This project started life as part of a field course. If you spot any missing citations or licences please [open an issue](https://github.com/gampnico/scintillometry/issues).

Comprehensive documentation is available [via ReadTheDocs](https://scintillometry.readthedocs.io/en/latest/).

Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ tqdm>4.8
scipy>=1.10
mpmath>=1.2.1
numpy
scikit-learn
matplotlib
kneed
pytest>=7.0
Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def setup(app):
project = "Scintillometry"
copyright = f"2019-{date.today().year}, Scintillometry Contributors"
author = "Scintillometry Contributors"
release = "1.0.4"
release = "1.0.5"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down Expand Up @@ -124,6 +124,7 @@ def setup(app):
.. |Psi_m| replace:: :math:`\\Psi_{{m}}`
.. |Q_0| replace:: :math:`Q_{{0}}`
.. |r| replace:: :math:`r`
.. |R^2| replace:: math:`R^{{2}}`
.. |R_dry| replace:: :math:`R_{{dry}}`
.. |R_v| replace:: :math:`R_{{v}}`
.. |rho| replace:: :math:`\\rho`
Expand Down
10 changes: 10 additions & 0 deletions docs/source/scintillometry.backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ In: scintillometry.backend.iterations.py
:undoc-members:
:show-inheritance:

Deprecations module
-------------------

In: scintillometry.backend.deprecations.py

.. automodule:: scintillometry.backend.deprecations
:members:
:undoc-members:
:show-inheritance:

References
----------

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ build-backend = "hatchling.build"

[project]
name = "scintillometry"
version = "1.0.4"
version = "1.0.5"
authors = [
{ name="Scintillometry Contributors", email="" },
]
description = "Analyse data & 2D flux footprints from Scintec's BLS scintillometers."
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE"}
license = "Apache-2.0"
classifiers = [
"Private :: Do Not Upload",
"License :: OSI Approved :: Apache Software License",
Expand All @@ -31,6 +31,7 @@ dependencies = [
"scipy >= 1.10",
"mpmath >= 1.2.1",
"numpy",
"scikit-learn",
"matplotlib",
"kneed",
]
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ tqdm>4.8
scipy>=1.10
mpmath>=1.2.1
numpy
scikit-learn
matplotlib
kneed
12 changes: 4 additions & 8 deletions src/scintillometry/backend/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ class AtmosConstants(object):
BLS type.
lamda (float): BLS wavelength, |lamda| [nm].
lamda_error (float): BLS wavelength error, [nm].
m1_opt (float): Needed for |A_T| and |A_q|, from Owens (1967).
[#owens1967]_
m2_opt (float): Needed for |A_T| and |A_q|, from Owens (1967).
[#owens1967]_

at_opt (float): |A_T| coefficient for 880 nm & typical
atmospheric conditions, from Ward et al. (2013).
Expand All @@ -60,7 +56,7 @@ class AtmosConstants(object):
20°C [|Jkg^-1|].
r_dry (float): Specific gas constant for dry air,
|R_dry| [|JK^-1| |kg^-1|].
r_vapour (float): Specific gas contstant for water vapour,
r_vapour (float): Specific gas constant for water vapour,
|R_v| [|JK^-1| |kg^-1|].
ratio_rmm (float): Ratio of molecular masses of water vapour and
dry air i.e. ratio of gas constants |epsilon|.
Expand Down Expand Up @@ -149,7 +145,7 @@ def convert_pressure(self, pressure, base=True):
pressure (Union[pd.DataFrame, pd.Series]): Pressure
measurements |P| in pascals [Pa], hectopascals [hPa], or
bars [bar].
base (bool): If True, converts to pascals [Pa]. Otherwise
base (bool): If True, converts to pascals [Pa]. Otherwise,
converts to hectopascals [hPa]. Default True.

Returns:
Expand Down Expand Up @@ -186,12 +182,12 @@ def convert_temperature(self, temperature, base=True):
- T [°C] < 130 °C

This method should therefore only be used on pre-processed data
as a *convenience*. By default converts to kelvins.
as a *convenience*. By default, converts to kelvins.

Args:
temperature (Union[pd.DataFrame, pd.Series]): Temperature
measurements |T| in kelvins [K] or Celsius [°C].
base (bool): If True, converts to kelvins [K]. Otherwise
base (bool): If True, converts to kelvins [K]. Otherwise,
converts to Celsius [°C]. Default True.

Returns:
Expand Down
6 changes: 3 additions & 3 deletions src/scintillometry/backend/constructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_mixing_ratio(self, wv_pressure, d_pressure):

# (wv_pressure * self.r_dry) / (d_pressure * self.r_vapour)
m_ratio = (wv_pressure.multiply(self.constants.r_dry)).divide(
(d_pressure).multiply(self.constants.r_vapour)
d_pressure.multiply(self.constants.r_vapour)
)

return m_ratio
Expand Down Expand Up @@ -236,7 +236,7 @@ def get_reduced_pressure(self, station_pressure, virtual_temperature, elevation)
elevation (float): Station elevation, |z_stn| [m].

Returns:
pd.DataDrame: Derived vertical measurements for mean
pd.DataFrame: Derived vertical measurements for mean
sea-level pressure, |P_MSL| [Pa].
"""

Expand Down Expand Up @@ -495,7 +495,7 @@ def get_gradient(self, data, method="backward"):
:math:`\\partial T/\\partial z` for heights |z| with time
index t.

By default the gradient is calculated using a 1-D
By default, the gradient is calculated using a 1-D
centred-differencing scheme for non-uniform meshes, since
vertical measurements are rarely made at uniform intervals.

Expand Down
Loading