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

Prepare for v3.0.0 #189

Merged
merged 27 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4808a6c
Deprecate "transient_asym_att_x", "transient_att_x" in favor of trans…
bdestombe Jul 31, 2023
cd1c221
Deprecate transient_att_x from tests in favor of trans_att
bdestombe Jul 31, 2023
701f599
black formatting
bdestombe Jul 31, 2023
3ba2b20
Inconsistent ds.sections behavior
bdestombe Jul 31, 2023
78c6aa7
Removing api directory from docs
bdestombe Aug 3, 2023
8c295a7
Clean up of documentation
bdestombe Aug 3, 2023
fd57fd3
Another cleanup of docs
bdestombe Aug 3, 2023
e28bb88
Cleanup docs
bdestombe Aug 3, 2023
fcbf028
Update headings example nb 14
bdestombe Aug 4, 2023
3b5afa7
Updated changelog to include the fixing the headers of the example no…
bdestombe Aug 4, 2023
26d795f
Black formatted docs/conf.py
bdestombe Aug 4, 2023
dd6d21c
Improves consistency of ds.sections behavior
bdestombe Aug 4, 2023
ab12189
variance_stokes_linear() does not default through zero anymore.
bdestombe Aug 4, 2023
b58afef
black formatting
bdestombe Aug 4, 2023
0ee7291
Moved validate_sections() to please mypy
bdestombe Aug 4, 2023
146faf2
Renamed io.py to io_utils.py and moved read_*_files() to io.py
bdestombe Aug 4, 2023
bf53930
Pull code through linter
bdestombe Aug 4, 2023
10f36c3
Refactored ufunc_per_section and moved ParameterIndex_Ended to datast…
bdestombe Aug 6, 2023
e64418a
Refactored calibration_single_ended() and calibration_double_ended()
bdestombe Aug 6, 2023
1eded97
Updated changelog and corrected small error due to refactoring
bdestombe Aug 6, 2023
270c74d
Forgotten comma
bdestombe Aug 6, 2023
f8872ec
Sorted imports
bdestombe Aug 6, 2023
cff9809
Reordered some functions in datastore_utils.py
bdestombe Aug 6, 2023
155fafe
Removed installation page from docs
bdestombe Aug 8, 2023
62ffb6c
Reformulated CHANGELOG.rst entry
bdestombe Aug 8, 2023
0c8b1f0
Cleared old dangling readthedocs files
bdestombe Aug 8, 2023
9b1fae2
Merge branch 'prepare-for-v3.0.0' of https://github.com/dtscalibratio…
bdestombe Aug 8, 2023
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
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ Added
Fixed

* Single-ended measurements with `fix_alpha` failed due to a bug introduced in v2.0.0 ([#173](https://github.com/dtscalibration/python-dts-calibration/pull/173)).
* Fixes headers in example notebooks and their appearance in the docs
bdestombe marked this conversation as resolved.
Show resolved Hide resolved

Changed

* Standardized parameter names. Reduced the freedom in choosing parameter names and dimension names in favor of simplifying the code.
* Requiring netcdf4 >= 1.6.4
* Optional dependencies of xarray that improve performance are now required by default.
* variance_stokes_linear() does not default through zero anymore.
* Refactored calibration_single_ended and calibration_double_ended()
* Moved ParameterIndices classes to calibration_utils.py
* Flox included in requirements to speed up resampling via xarray ([Xarray #5734](https://github.com/pydata/xarray/pull/5734)).

Removed
Expand Down
83 changes: 0 additions & 83 deletions docs/api/dtscalibration.DataStore.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.check_dims.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.check_timestep_allclose.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.get_netcdf_encoding.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.merge_double_ended.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.open_datastore.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.open_mf_datastore.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.plot_accuracy.rst

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.plot_residuals_reference_sections.rst

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.plot_sigma_report.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.read_apsensing_files.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.read_sensornet_files.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.read_sensortran_files.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.read_silixa_files.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.shift_double_ended.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/dtscalibration.suggest_cable_shift_double_ended.rst

This file was deleted.

1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


extensions = [
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
Expand Down
3 changes: 1 addition & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ Contents
========

.. toctree::
:maxdepth: 2
:maxdepth: 3

readme
installation
bdestombe marked this conversation as resolved.
Show resolved Hide resolved
usage
learn_by_examples
reference/index
contributing
Expand Down
10 changes: 5 additions & 5 deletions docs/notebooks/07Calibrate_single_ended.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Read the raw data files loaded from your DTS machine\n",
"## Read the raw data files loaded from your DTS machine\n",
"Use `read_silixa_files` for reading files from a Silixa device. The following functions are available for reading files from other devices: `read_sensortran_files`, `read_apsensing_files`, and `read_sensornet_files`. See Notebook 1.\n",
"\n",
"Calibration is performed on sections that have a known"
Expand All @@ -79,7 +79,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Define the reference fiber sections that have a known temperature\n",
"## Define the reference fiber sections that have a known temperature\n",
"As explained in Notebook 3. DTS devices come with temperature probes to measure the temperature of the water baths. These measurements are stored in the data that was loaded in the previous step and are loaded automatically. In the case you would like to use an external temperature sensor, have a look at notebook `09Import_timeseries` to append those measurements to the `ds` before continuing with the calibration. "
]
},
Expand All @@ -100,7 +100,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Estimate the variance of the noise in the Stokes and anti-Stokes measurements\n",
"## Estimate the variance of the noise in the Stokes and anti-Stokes measurements\n",
"First calculate the variance of the noise in the measured Stokes and anti-Stokes signals. See Notebook 4 for more information.\n",
"\n",
"The Stokes and anti-Stokes signals should follow a smooth decaying exponential. This function fits a decaying exponential to each reference section for each time step. The variance of the residuals between the measured Stokes and anti-Stokes signals and the fitted signals is used as an estimate of the variance in measured signals. This algorithm assumes that the temperature is the same for the entire section but may vary over time and differ per section."
Expand Down Expand Up @@ -143,7 +143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Perform calibration and compute the temperature\n",
"## Perform calibration and compute the temperature\n",
"We calibrate the measurements and their uncertainty with a single method call. The temperature is stored by default as the `ds.tmpf` dataarray and the variance of its approximation as `ds.tmpf_var`."
]
},
Expand All @@ -167,7 +167,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Plot the temperature and uncertainty of the estimated temperature\n",
"## Plot the temperature and uncertainty of the estimated temperature\n",
"First, the temperature for the entire fiber is plotted. Second, the temperature and its standard error are plotted for the first timestep."
]
},
Expand Down
12 changes: 6 additions & 6 deletions docs/notebooks/08Calibrate_double_ended.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Read the raw data files loaded from your DTS machine\n",
"## Read the raw data files loaded from your DTS machine\n",
"Use `read_silixa_files` for reading files from a Silixa device. The following functions are available for reading files from other devices: `read_sensortran_files`, `read_apsensing_files`, and `read_sensornet_files`. See Notebook 1. If your DTS device was configured such that your forward- and backward measurements are stored in seperate folders have a look at `11Merge_single_measurements_into_double` example notebook. "
]
},
Expand All @@ -77,7 +77,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Align measurements of the forward and backward channels"
"## Align measurements of the forward and backward channels"
]
},
{
Expand Down Expand Up @@ -147,7 +147,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Define the reference fiber sections that have a known temperature\n",
"## Define the reference fiber sections that have a known temperature\n",
"As explained in Notebook 3. As explained in Notebook 3. DTS devices come with temperature probes to measure the temperature of the water baths. These measurements are stored in the data that was loaded in the previous step and are loaded automatically. In the case you would like to use an external temperature sensor, have a look at notebook `09Import_timeseries` to append those measurements to the `ds` before continuing with the calibration."
]
},
Expand All @@ -167,7 +167,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Estimate the variance of the noise in the Stokes and anti-Stokes measurements\n",
"## Estimate the variance of the noise in the Stokes and anti-Stokes measurements\n",
"First calculate the variance in the measured Stokes and anti-Stokes signals, in the forward and backward direction. See Notebook 4 for more information.\n",
"\n",
"The Stokes and anti-Stokes signals should follow a smooth decaying exponential. This function fits a decaying exponential to each reference section for each time step. The variance of the residuals between the measured Stokes and anti-Stokes signals and the fitted signals is used as an estimate of the variance in measured signals. This algorithm assumes that the temperature is the same for the entire section but may vary over time and differ per section."
Expand Down Expand Up @@ -219,7 +219,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Perform calibration and compute the temperature\n",
"## Perform calibration and compute the temperature\n",
"We calibrate the measurements with a single method call. Three temperatures are estimated for double-ended setups. The temperature using the Stokes and anti-Stokes meassurements of the forward channel, `tmpf`. The temperature of the backward channel, `tmpb`. And the weigthed average of the two, `tmpw`. The latter is the best estimate of the temperature along the fiber with the smallest uncertainty."
]
},
Expand Down Expand Up @@ -264,7 +264,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Uncertainty of the calibrated temperature\n",
"## Uncertainty of the calibrated temperature\n",
"The uncertainty of the calibrated temperature can be computed in two manners:\n",
"1. The variance of the calibrated temperature can be approximated using linear error propagation\n",
" - Very fast computation\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/14Lossy_splices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Demonstration\n",
"## Demonstration\n",
"To demonstrate the effect of a lossy splice, we'll load the same dataset that was used in previous notebooks, and modify the data to simulate a lossy splice."
]
},
Expand Down Expand Up @@ -230,5 +230,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "bcd29771",
"metadata": {},
"source": [
"# Uncertainty of the temperature estimated using single-ended calibration\n",
"# 17. Uncertainty of the temperature estimated using single-ended calibration\n",
"After comleting single-ended calibration, you might be interested in inspecting the uncertainty of the estimated temperature.\n",
"- Decomposing the uncertainty\n",
"- Monte Carlo estimate of the standard error\n",
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Reference
:glob:

.. automodapi:: dtscalibration
:no-inheritance-diagram:
:skip: plot_dask
:members:
:no-inheritance-diagram:
6 changes: 0 additions & 6 deletions docs/requirements.txt
bdestombe marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
IPython
matplotlib>=3.0.0
nbsphinx
recommonmark
sphinx<6
sphinx-automodapi
-e .[docs]
7 changes: 0 additions & 7 deletions docs/usage.rst

This file was deleted.

Loading
Loading