Skip to content

Commit a4e6e1a

Browse files
authored
Merge pull request #99 from bdestombe/master
Renaming ST to st, REV-AST to rast, etc. Reduced flexibility in defining labels.
2 parents 87ee27a + c5e14ad commit a4e6e1a

37 files changed

+1387
-1234
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.9.0
2+
current_version = 0.9.2
33
commit = True
44
tag = True
55

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11

22
Changelog
33
=========
4+
0.9.2 (2020-03-17)
5+
------------------
6+
* Reduced flexibility in defining Stokes labels
7+
8+
0.9.1 (2020-03-17)
9+
------------------
10+
* Same as 0.9.2
11+
412
0.9.0 (2020-03-16)
513
------------------
614
* Increased precision of least squares solver, as this was limiting theprecision of the parameter estimation
@@ -28,7 +36,7 @@ Changelog
2836
0.7.3 (2020-01-24)
2937
------------------
3038
* Solved xlim in subplots of plot_residuals_reference_sections funciton
31-
* Solved YAML depreciation related problems
39+
* Solved YAML deprecation related problems
3240
* Introduced new approach for double ended calibration, with a different Cfor the forward and backward channel
3341
* First code added for time variant asymmetric attenuation, such as connectors.
3442
* First code added for matching sections

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ doi: "10.5281/zenodo.1410097"
2222
license: "BSD-3-Clause"
2323
repository-code: "https://github.com/dtscalibration/python-dts-calibration"
2424
title: "Python distributed temperature sensing calibration"
25-
version: "v0.9.0"
25+
version: "v0.9.2"
2626
url: "https://python-dts-calibration.readthedocs.io"

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Overview
3737
:alt: PyPI Package latest release
3838
:target: https://pypi.python.org/pypi/dtscalibration
3939

40-
.. |commits-since| image:: https://img.shields.io/github/commits-since/dtscalibration/python-dts-calibration/v0.9.0.svg
40+
.. |commits-since| image:: https://img.shields.io/github/commits-since/dtscalibration/python-dts-calibration/v0.9.2.svg
4141
:alt: Commits since latest release
42-
:target: https://github.com/dtscalibration/python-dts-calibration/compare/v0.9.0...master
42+
:target: https://github.com/dtscalibration/python-dts-calibration/compare/v0.9.2...master
4343

4444
.. |wheel| image:: https://img.shields.io/pypi/wheel/dtscalibration.svg
4545
:alt: PyPI Wheel

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
year = str(date.today().year)
3737
author = 'Bas des Tombe'
3838
copyright = '{0}, {1}'.format(year, author)
39-
version = release = '0.9.0'
39+
version = release = '0.9.2'
4040

4141
pygments_style = 'trac'
4242
templates_path = ['.']

docs/examples/notebooks/02Common_DataStore_functions_slice_mean_max_std_resample.ipynb.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Examples of how to do some of the more commonly used functions:
1212
.. code:: ipython3
1313
1414
import os
15-
15+
1616
from dtscalibration import read_silixa_files
1717
1818
@@ -28,7 +28,7 @@ learned from the previous notebook.
2828
.. code:: ipython3
2929
3030
filepath = os.path.join('..', '..', 'tests', 'data', 'single_ended')
31-
31+
3232
ds = read_silixa_files(
3333
directory=filepath,
3434
timezone_netcdf='UTC',
@@ -55,7 +55,7 @@ http://xarray.pydata.org/en/stable/indexing.html
5555

5656
.. code:: ipython3
5757
58-
ds['ST'] # is the data stored, presented as a DataArray
58+
ds['st'] # is the data stored, presented as a DataArray
5959
6060
6161
@@ -87,7 +87,7 @@ http://xarray.pydata.org/en/stable/indexing.html
8787

8888
.. code:: ipython3
8989
90-
ds['TMP'].plot(figsize=(12, 8));
90+
ds['tmp'].plot(figsize=(12, 8));
9191
9292
1 mean, min, max
9393
----------------

docs/examples/notebooks/04Calculate_variance_Stokes.ipynb.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ estimate the variance of the noise to: - Perform a weighted calibration
1010
.. code:: ipython3
1111
1212
import os
13-
13+
1414
from dtscalibration import read_silixa_files
1515
from matplotlib import pyplot as plt
16-
16+
1717
%matplotlib inline
1818
1919
@@ -26,7 +26,7 @@ estimate the variance of the noise to: - Perform a weighted calibration
2626
.. code:: ipython3
2727
2828
filepath = os.path.join('..', '..', 'tests', 'data', 'double_ended2')
29-
29+
3030
ds = read_silixa_files(
3131
directory=filepath,
3232
timezone_netcdf='UTC',
@@ -58,25 +58,25 @@ method.
5858

5959
.. code:: ipython3
6060
61-
print(ds.variance_stokes.__doc__)
61+
print(ds.variance_stokes.__doc__)
6262
6363
6464
.. parsed-literal::
6565
6666
Backwards compatibility
67-
67+
6868
Use:
6969
- `variance_stokes_constant` for small setups with small variations in
7070
intensity
7171
- `variance_stokes_exponential` for small setups with very few time
7272
steps
7373
- `variance_stokes_linear` for larger setups with more time steps
74-
74+
7575
7676
7777
.. code:: ipython3
7878
79-
I_var, residuals = ds.variance_stokes(st_label='ST')
79+
I_var, residuals = ds.variance_stokes(st_label='st')
8080
print("The variance of the Stokes signal along the reference sections "
8181
"is approximately {} on a {} sec acquisition time".format(I_var, ds.userAcquisitionTimeFW.data[0]))
8282
@@ -89,7 +89,7 @@ method.
8989
.. code:: ipython3
9090
9191
from dtscalibration import plot
92-
92+
9393
fig_handle = plot.plot_residuals_reference_sections(
9494
residuals,
9595
sections,
@@ -127,7 +127,7 @@ by coils/sharp bends in cable - Attenuation caused by a splice
127127
128128
import scipy
129129
import numpy as np
130-
130+
131131
sigma = residuals.std()
132132
mean = residuals.mean()
133133
x = np.linspace(mean - 3*sigma, mean + 3*sigma, 100)

docs/examples/notebooks/05Calibrate_single_ols.ipynb.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ anymore.
1515
.. code:: ipython3
1616
1717
import os
18-
18+
1919
from dtscalibration import read_silixa_files
2020
import matplotlib.pyplot as plt
21-
21+
2222
%matplotlib inline
2323
2424
@@ -31,12 +31,12 @@ anymore.
3131
.. code:: ipython3
3232
3333
filepath = os.path.join('..', '..', 'tests', 'data', 'single_ended')
34-
34+
3535
ds = read_silixa_files(
3636
directory=filepath,
3737
timezone_netcdf='UTC',
3838
file_ext='*.xml')
39-
39+
4040
ds100 = ds.sel(x=slice(-30, 101)) # only calibrate parts of the fiber, in meters
4141
sections = {
4242
'probe1Temperature': [slice(20, 25.5)], # warm bath
@@ -61,8 +61,8 @@ anymore.
6161
6262
.. parsed-literal::
6363
64-
65-
64+
65+
6666
Parameters
6767
----------
6868
store_p_cov : str
@@ -119,17 +119,17 @@ anymore.
119119
variance of the estimate of dalpha.
120120
Covariances between alpha and other parameters are not accounted
121121
for.
122-
122+
123123
Returns
124124
-------
125-
126-
125+
126+
127127
128128
129129
.. code:: ipython3
130130
131-
ds100.calibration_single_ended(st_label='ST',
132-
ast_label='AST',
131+
ds100.calibration_single_ended(st_label='st',
132+
ast_label='ast',
133133
method='ols')
134134
135135
@@ -144,9 +144,9 @@ Lets compare our calibrated values with the device calibration
144144
.. code:: ipython3
145145
146146
ds1 = ds100.isel(time=0) # take only the first timestep
147-
148-
ds1.TMPF.plot(linewidth=1, figsize=(12, 8), label='User calibrated') # plot the temperature calibrated by us
149-
ds1.TMP.plot(linewidth=1, label='Device calibrated') # plot the temperature calibrated by the device
147+
148+
ds1.tmpf.plot(linewidth=1, figsize=(12, 8), label='User calibrated') # plot the temperature calibrated by us
149+
ds1.tmp.plot(linewidth=1, label='Device calibrated') # plot the temperature calibrated by the device
150150
plt.title('Temperature at the first time step')
151151
plt.legend();
152152

docs/examples/notebooks/06Calibrate_double_ols.ipynb.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ channel should be aligned.
1313
.. code:: ipython3
1414
1515
import os
16-
16+
1717
from dtscalibration import read_silixa_files
1818
import matplotlib.pyplot as plt
1919
%matplotlib inline
@@ -28,12 +28,12 @@ channel should be aligned.
2828
.. code:: ipython3
2929
3030
filepath = os.path.join('..', '..', 'tests', 'data', 'double_ended2')
31-
31+
3232
ds = read_silixa_files(
3333
directory=filepath,
3434
timezone_netcdf='UTC',
3535
file_ext='*.xml')
36-
36+
3737
ds100 = ds.sel(x=slice(0, 100)) # only calibrate parts of the fiber
3838
sections = {
3939
'probe1Temperature': [slice(7.5, 17.), slice(70., 80.)], # cold bath
@@ -57,8 +57,8 @@ channel should be aligned.
5757
5858
.. parsed-literal::
5959
60-
61-
60+
61+
6262
Parameters
6363
----------
6464
store_p_cov : str
@@ -149,20 +149,20 @@ channel should be aligned.
149149
has three items. The first two items are the slices of the sections
150150
that are matched. The third item is a boolean and is True if the two
151151
sections have a reverse direction ("J-configuration").
152-
153-
152+
153+
154154
Returns
155155
-------
156-
157-
156+
157+
158158
159159
160160
.. code:: ipython3
161161
162-
st_label = 'ST'
163-
ast_label = 'AST'
164-
rst_label = 'REV-ST'
165-
rast_label = 'REV-AST'
162+
st_label = 'st'
163+
ast_label = 'ast'
164+
rst_label = 'rst'
165+
rast_label = 'rast'
166166
ds100.calibration_double_ended(sections=sections,
167167
st_label=st_label,
168168
ast_label=ast_label,
@@ -171,8 +171,8 @@ channel should be aligned.
171171
method='ols')
172172
173173
After calibration, two data variables are added to the ``DataStore``
174-
object: - ``TMPF``, temperature calculated along the forward direction -
175-
``TMPB``, temperature calculated along the backward direction
174+
object: - ``tmpf``, temperature calculated along the forward direction -
175+
``tmpb``, temperature calculated along the backward direction
176176

177177
A better estimate, with a lower expected variance, of the temperature
178178
along the fiber is the average of the two. We cannot weigh on more than
@@ -181,10 +181,10 @@ the other, as we do not have more information about the weighing.
181181
.. code:: ipython3
182182
183183
ds1 = ds100.isel(time=0) # take only the first timestep
184-
185-
ds1.TMPF.plot(linewidth=1, label='User cali. Forward', figsize=(12, 8)) # plot the temperature calibrated by us
186-
ds1.TMPB.plot(linewidth=1, label='User cali. Backward') # plot the temperature calibrated by us
187-
ds1.TMP.plot(linewidth=1, label='Device calibrated') # plot the temperature calibrated by the device
184+
185+
ds1.tmpf.plot(linewidth=1, label='User cali. Forward', figsize=(12, 8)) # plot the temperature calibrated by us
186+
ds1.tmpb.plot(linewidth=1, label='User cali. Backward') # plot the temperature calibrated by us
187+
ds1.tmp.plot(linewidth=1, label='Device calibrated') # plot the temperature calibrated by the device
188188
plt.legend();
189189
190190
@@ -198,9 +198,9 @@ first.
198198

199199
.. code:: ipython3
200200
201-
ds1['TMPAVG'] = (ds1.TMPF + ds1.TMPB) / 2
201+
ds1['TMPAVG'] = (ds1.tmpf + ds1.tmpb) / 2
202202
ds1_diff = ds1.TMP - ds1.TMPAVG
203-
203+
204204
ds1_diff.plot(figsize=(12, 8));
205205
206206

0 commit comments

Comments
 (0)