jupyter-analysis-tools 1.2.1__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/.cookiecutterrc +1 -1
  2. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/CHANGELOG.md +14 -0
  3. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/PKG-INFO +17 -3
  4. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/README.rst +2 -2
  5. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/conf.py +1 -1
  6. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/__init__.py +1 -1
  7. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/readdata.py +13 -10
  8. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools.egg-info/PKG-INFO +17 -3
  9. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/testdata/S2842 water.json +7 -17
  10. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/tests/readdata.py +26 -15
  11. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/.editorconfig +0 -0
  12. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/.pre-commit-config.yaml +0 -0
  13. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/AUTHORS.rst +0 -0
  14. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/CONTRIBUTING.rst +0 -0
  15. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/LICENSE +0 -0
  16. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/MANIFEST.in +0 -0
  17. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/requirements.txt +0 -0
  18. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/templates/.github/workflows/build.yml +0 -0
  19. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/templates/.github/workflows/ci-cd.yml +0 -0
  20. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/templates/.github/workflows/coverage.yml +0 -0
  21. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/templates/.github/workflows/docs.yml +0 -0
  22. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/templates/.github/workflows/release.yml +0 -0
  23. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/templates/.github/workflows/tests.yml +0 -0
  24. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/ci/update.py +0 -0
  25. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/_templates/class.rst +0 -0
  26. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/_templates/module.rst +0 -0
  27. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/authors.rst +0 -0
  28. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/changelog.rst +0 -0
  29. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/contributing.rst +0 -0
  30. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/index.rst +0 -0
  31. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/installation.rst +0 -0
  32. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/readme.rst +0 -0
  33. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/reference/index.rst +0 -0
  34. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/requirements.txt +0 -0
  35. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/spelling_wordlist.txt +0 -0
  36. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/docs/usage.rst +0 -0
  37. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/pyproject.toml +0 -0
  38. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/setup.cfg +0 -0
  39. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/analysis.py +0 -0
  40. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/binning.py +0 -0
  41. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/datalocations.py +0 -0
  42. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/distrib.py +0 -0
  43. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/git.py +0 -0
  44. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/plotting.py +0 -0
  45. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/utils.py +0 -0
  46. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools/widgets.py +0 -0
  47. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools.egg-info/SOURCES.txt +0 -0
  48. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools.egg-info/dependency_links.txt +0 -0
  49. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools.egg-info/requires.txt +0 -0
  50. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/src/jupyter_analysis_tools.egg-info/top_level.txt +0 -0
  51. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/templates/CHANGELOG.md.j2 +0 -0
  52. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/testdata/2015-03-20-Silica.ssf.json +0 -0
  53. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/testdata/2015-03-20-Silica.ssfz +0 -0
  54. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/testdata/S2842 water.pdh +0 -0
  55. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/testdata/S2843[9].pdh +0 -0
  56. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/tests/requirements.txt +0 -0
  57. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/tests/utils.py +0 -0
  58. {jupyter_analysis_tools-1.2.1 → jupyter_analysis_tools-1.2.2}/tox.ini +0 -0
@@ -20,7 +20,7 @@ default_context:
20
20
  release_date: 'today'
21
21
  year_from: '2018'
22
22
  year_to: '2023'
23
- version: '1.2.1'
23
+ version: '1.2.2'
24
24
  pypi_host: 'pypi.org'
25
25
  license: 'MIT license'
26
26
  sphinx_theme: 'furo'
@@ -1,5 +1,19 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.2.2 (2025-07-15)
4
+
5
+ ### Bug fixes
6
+
7
+ * readPDHmeta: use unique dict keys, the xmk *key* can occur in multiple groups in PDH ([`ef41c81`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/ef41c81d40d801b5baf86f56cf9012ca35d2ccde))
8
+
9
+ ### Documentation
10
+
11
+ * pyproject: revert specify readme+changelog document types ([`1baa762`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/1baa762d441fe0a1b7b663b9d0589de857277426))
12
+
13
+ * pyproject: specify readme+changelog document types to render overview on pypi correctly ([`6e4d1e5`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/6e4d1e56640b604f971ddca8dabd8d1aff5c9bf1))
14
+
15
+ * ghpages: make sure .nojekyll exists after purging old html docs ([`4847845`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/4847845cc06884b6e589b26897e83411d649ef4d))
16
+
3
17
  ## v1.2.1 (2025-07-11)
4
18
 
5
19
  ### Bug fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jupyter-analysis-tools
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Yet another Python library with helpers and utilities for data analysis and processing.
5
5
  Author-email: Ingo Breßler <dev@ingobressler.net>
6
6
  License: MIT license
@@ -53,8 +53,8 @@ Yet another Python library with helpers and utilities for data analysis and proc
53
53
  :target: https://pypi.org/project/jupyter-analysis-tools
54
54
  :alt: PyPI Package latest release
55
55
 
56
- .. |commits-since| image:: https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.2.1.svg
57
- :target: https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.2.1...main
56
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.2.2.svg
57
+ :target: https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.2.2...main
58
58
  :alt: Commits since latest release
59
59
 
60
60
  .. |license| image:: https://img.shields.io/pypi/l/jupyter-analysis-tools.svg
@@ -127,6 +127,20 @@ Note, to combine the coverage data from all the tox environments run:
127
127
 
128
128
  # CHANGELOG
129
129
 
130
+ ## v1.2.2 (2025-07-15)
131
+
132
+ ### Bug fixes
133
+
134
+ * readPDHmeta: use unique dict keys, the xmk *key* can occur in multiple groups in PDH ([`ef41c81`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/ef41c81d40d801b5baf86f56cf9012ca35d2ccde))
135
+
136
+ ### Documentation
137
+
138
+ * pyproject: revert specify readme+changelog document types ([`1baa762`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/1baa762d441fe0a1b7b663b9d0589de857277426))
139
+
140
+ * pyproject: specify readme+changelog document types to render overview on pypi correctly ([`6e4d1e5`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/6e4d1e56640b604f971ddca8dabd8d1aff5c9bf1))
141
+
142
+ * ghpages: make sure .nojekyll exists after purging old html docs ([`4847845`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/4847845cc06884b6e589b26897e83411d649ef4d))
143
+
130
144
  ## v1.2.1 (2025-07-11)
131
145
 
132
146
  ### Bug fixes
@@ -14,8 +14,8 @@ Yet another Python library with helpers and utilities for data analysis and proc
14
14
  :target: https://pypi.org/project/jupyter-analysis-tools
15
15
  :alt: PyPI Package latest release
16
16
 
17
- .. |commits-since| image:: https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.2.1.svg
18
- :target: https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.2.1...main
17
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.2.2.svg
18
+ :target: https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.2.2...main
19
19
  :alt: Commits since latest release
20
20
 
21
21
  .. |license| image:: https://img.shields.io/pypi/l/jupyter-analysis-tools.svg
@@ -29,7 +29,7 @@ project = "Jupyter Analysis Tools"
29
29
  year = "2018-2023"
30
30
  author = "Ingo Breßler"
31
31
  copyright = "{0}, {1}".format(year, author)
32
- version = "1.2.1"
32
+ version = "1.2.2"
33
33
  release = version
34
34
  commit_id = None
35
35
  try:
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # __init__.py
3
3
 
4
- __version__ = "1.2.1"
4
+ __version__ = "1.2.2"
5
5
 
6
6
  from .binning import reBin
7
7
  from .git import checkRepo, isNBstripoutActivated, isNBstripoutInstalled, isRepo
@@ -68,14 +68,18 @@ def xmlPDHToDict(root):
68
68
  while stack:
69
69
  elem, parentCont = stack.pop()
70
70
  elemCont = {}
71
- key = elem.attrib.pop("key", None)
72
71
  idx = -1
73
- if (
74
- not len(list(elem)) and
75
- not len(elem.attrib) and
76
- not (elem.text and len(elem.text.strip()))
72
+ key = elem.attrib.pop("key", None)
73
+ if ( # get a unique key, the key can occur in multiple groups in PDH
74
+ key is not None and elem.tag == "group" and elem.attrib.get("id", None) is not None
75
+ ):
76
+ key = elem.attrib.pop("id")
77
+ if ( # skip empty elements with a key only early
78
+ not len(list(elem))
79
+ and not len(elem.attrib)
80
+ and not (elem.text and len(elem.text.strip()))
77
81
  ):
78
- continue # skip empty elements with a key only early
82
+ continue
79
83
  if elem.tag == "list":
80
84
  elemCont = []
81
85
  else: # add attributes & values to dict
@@ -115,9 +119,8 @@ def xmlPDHToDict(root):
115
119
  else: # have a key
116
120
  parentCont[parentKey] = {key: elemCont}
117
121
  else: # parentKey exists already
118
- if (
119
- not isinstance(parentCont[parentKey], list) and
120
- not isinstance(parentCont[parentKey], dict)
122
+ if not isinstance(parentCont[parentKey], list) and not isinstance(
123
+ parentCont[parentKey], dict
121
124
  ):
122
125
  # if its a plain value before, make a list out of it and append in next step
123
126
  parentCont[parentKey] = [parentCont[parentKey]]
@@ -135,7 +138,7 @@ def xmlPDHToDict(root):
135
138
  try:
136
139
  oldts = result["fileinfo"]["parameter"]["DateTime"]["value"]
137
140
  # timestamp seems to be based on around 2009-01-01 (a day give or take)
138
- delta = ((39 * 365 + 10) * 24 * 3600)
141
+ delta = (39 * 365 + 10) * 24 * 3600
139
142
  # make it compatible to datetime.datetime routines
140
143
  result["fileinfo"]["parameter"]["DateTime"]["value"] = oldts + delta
141
144
  except KeyError:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jupyter-analysis-tools
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Yet another Python library with helpers and utilities for data analysis and processing.
5
5
  Author-email: Ingo Breßler <dev@ingobressler.net>
6
6
  License: MIT license
@@ -53,8 +53,8 @@ Yet another Python library with helpers and utilities for data analysis and proc
53
53
  :target: https://pypi.org/project/jupyter-analysis-tools
54
54
  :alt: PyPI Package latest release
55
55
 
56
- .. |commits-since| image:: https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.2.1.svg
57
- :target: https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.2.1...main
56
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.2.2.svg
57
+ :target: https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.2.2...main
58
58
  :alt: Commits since latest release
59
59
 
60
60
  .. |license| image:: https://img.shields.io/pypi/l/jupyter-analysis-tools.svg
@@ -127,6 +127,20 @@ Note, to combine the coverage data from all the tox environments run:
127
127
 
128
128
  # CHANGELOG
129
129
 
130
+ ## v1.2.2 (2025-07-15)
131
+
132
+ ### Bug fixes
133
+
134
+ * readPDHmeta: use unique dict keys, the xmk *key* can occur in multiple groups in PDH ([`ef41c81`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/ef41c81d40d801b5baf86f56cf9012ca35d2ccde))
135
+
136
+ ### Documentation
137
+
138
+ * pyproject: revert specify readme+changelog document types ([`1baa762`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/1baa762d441fe0a1b7b663b9d0589de857277426))
139
+
140
+ * pyproject: specify readme+changelog document types to render overview on pypi correctly ([`6e4d1e5`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/6e4d1e56640b604f971ddca8dabd8d1aff5c9bf1))
141
+
142
+ * ghpages: make sure .nojekyll exists after purging old html docs ([`4847845`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/4847845cc06884b6e589b26897e83411d649ef4d))
143
+
130
144
  ## v1.2.1 (2025-07-11)
131
145
 
132
146
  ### Bug fixes
@@ -165,7 +165,6 @@
165
165
  "isdevice": "false",
166
166
  "category": "exp",
167
167
  "sub": "sample",
168
- "id": "exp:sample:Default",
169
168
  "ParameterCount": {
170
169
  "value": 0,
171
170
  "counts": "ParameterKey|ParameterName|ParameterValue",
@@ -208,7 +207,6 @@
208
207
  "isdevice": "false",
209
208
  "category": "exp",
210
209
  "sub": "file",
211
- "id": "exp:file:Default",
212
210
  "Filename": {
213
211
  "value": "S2842",
214
212
  "type": "String",
@@ -261,7 +259,6 @@
261
259
  "isdevice": "false",
262
260
  "category": "exp",
263
261
  "sub": "vari",
264
- "id": "exp:vari:Default",
265
262
  "VariationCount": {
266
263
  "value": 0,
267
264
  "counts": "Parameter|Count|Start|Increment|Positions|Prefix|Digits|NamingOption",
@@ -316,10 +313,9 @@
316
313
  "db": "D"
317
314
  }
318
315
  },
319
- "custom_generator": {
316
+ "generator::custom_generator#0": {
320
317
  "isdevice": "true",
321
318
  "category": "generator",
322
- "id": "generator::custom_generator#0",
323
319
  "isactive": "true",
324
320
  "Name": {
325
321
  "value": "PW1830",
@@ -453,10 +449,9 @@
453
449
  "type": "String"
454
450
  }
455
451
  },
456
- "AP_SAXSess": {
452
+ "camera::AP_SAXSess#0": {
457
453
  "isdevice": "true",
458
454
  "category": "camera",
459
- "id": "camera::AP_SAXSess#0",
460
455
  "Name": {
461
456
  "value": "SAXSess",
462
457
  "type": "String",
@@ -573,11 +568,10 @@
573
568
  "type": "String"
574
569
  }
575
570
  },
576
- "PI_SCX4300": {
571
+ "detector:ccd:PI_SCX4300#0": {
577
572
  "isdevice": "true",
578
573
  "category": "detector",
579
574
  "sub": "ccd",
580
- "id": "detector:ccd:PI_SCX4300#0",
581
575
  "Name": {
582
576
  "value": "CCD",
583
577
  "type": "String",
@@ -897,10 +891,9 @@
897
891
  "Y": 1
898
892
  }
899
893
  },
900
- "AP_TCS120": {
894
+ "holder::AP_TCS120#0": {
901
895
  "isdevice": "true",
902
896
  "category": "holder",
903
- "id": "holder::AP_TCS120#0",
904
897
  "Name": {
905
898
  "value": "TCS 120",
906
899
  "type": "String",
@@ -957,11 +950,10 @@
957
950
  "type": "String"
958
951
  }
959
952
  },
960
- "AP_TCU50": {
953
+ "secu:temp:AP_TCU50#0": {
961
954
  "isdevice": "true",
962
955
  "category": "secu",
963
956
  "sub": "temp",
964
- "id": "secu:temp:AP_TCU50#0",
965
957
  "Name": {
966
958
  "value": "TCU 50",
967
959
  "type": "String",
@@ -1158,11 +1150,10 @@
1158
1150
  "type": "String"
1159
1151
  }
1160
1152
  },
1161
- "Dectris_Mythen1K": {
1153
+ "detector:ccd:Dectris_Mythen1K#0": {
1162
1154
  "isdevice": "true",
1163
1155
  "category": "detector",
1164
1156
  "sub": "ccd",
1165
- "id": "detector:ccd:Dectris_Mythen1K#0",
1166
1157
  "Name": {
1167
1158
  "value": "1D diode array",
1168
1159
  "type": "String",
@@ -1506,11 +1497,10 @@
1506
1497
  "Y": 1
1507
1498
  }
1508
1499
  },
1509
- "Spark_ASXc": {
1500
+ "sampler:auto:Spark_ASXc#0": {
1510
1501
  "isdevice": "true",
1511
1502
  "category": "sampler",
1512
1503
  "sub": "auto",
1513
- "id": "sampler:auto:Spark_ASXc#0",
1514
1504
  "Name": {
1515
1505
  "value": "ASX-c",
1516
1506
  "type": "String",
@@ -26,17 +26,28 @@ def test_readdata1(capsys):
26
26
  assert df.columns.tolist() == ["q", "I", "e"]
27
27
  assert df.dtypes.tolist() == [numpy.float64, numpy.float64, numpy.float64]
28
28
  # checking the first data values
29
- assert numpy.all(df.loc[:2].values == numpy.array(
30
- [[-1.005583e00, 5.555556e-08, 2.754402e-08],
31
- [-9.989474e-01, 3.611111e-07, 6.568830e-08],
32
- [-9.923112e-01, 3.055556e-07, 6.120415e-08]]))
29
+ assert numpy.all(
30
+ df.loc[:2].values
31
+ == numpy.array(
32
+ [
33
+ [-1.005583e00, 5.555556e-08, 2.754402e-08],
34
+ [-9.989474e-01, 3.611111e-07, 6.568830e-08],
35
+ [-9.923112e-01, 3.055556e-07, 6.120415e-08],
36
+ ]
37
+ )
38
+ )
33
39
  # and checking the last data values
34
- assert numpy.all(df.loc[df.shape[0] - 3 :].values == numpy.array(
35
- [[7.381979e00, 2.972222e-06, 1.792166e-07],
36
- [7.388376e00, 2.944444e-06, 1.436040e-07],
37
- [7.394774e00, 2.388889e-06, 1.548690e-07]]))
38
- assert numpy.all(df.median().values == numpy.array(
39
- [3.233221e00, 5.826389e-05, 8.835466e-07]))
40
+ assert numpy.all(
41
+ df.loc[df.shape[0] - 3 :].values
42
+ == numpy.array(
43
+ [
44
+ [7.381979e00, 2.972222e-06, 1.792166e-07],
45
+ [7.388376e00, 2.944444e-06, 1.436040e-07],
46
+ [7.394774e00, 2.388889e-06, 1.548690e-07],
47
+ ]
48
+ )
49
+ )
50
+ assert numpy.all(df.median().values == numpy.array([3.233221e00, 5.826389e-05, 8.835466e-07]))
40
51
 
41
52
 
42
53
  def test_readdata2(capsys):
@@ -48,8 +59,7 @@ def test_readdata2(capsys):
48
59
  assert fn == "S2843"
49
60
  assert df.shape == (427, 3)
50
61
  assert df.columns.tolist() == ["q", "I", "e"]
51
- assert numpy.all(df.median().values == numpy.array(
52
- [1.470428, 0.01907878, 0.01353293]))
62
+ assert numpy.all(df.median().values == numpy.array([1.470428, 0.01907878, 0.01353293]))
53
63
 
54
64
 
55
65
  def test_readPDHmeta1():
@@ -62,7 +72,7 @@ def test_readPDHmeta1():
62
72
 
63
73
  # writing the test JSON for comparisons on updates
64
74
  # with open(pathPDH1.with_suffix(".json"), "w") as fd:
65
- # json.dump(data, fd, indent=4)
75
+ # json.dump(data, fd, indent=4)
66
76
 
67
77
  # write the JSON formatted metadata to disk, read it back in and compare
68
78
  # it with the expected reference from testdata dir
@@ -97,8 +107,9 @@ def test_readSSF():
97
107
  # json.dump(data, fd, indent=4)
98
108
  # write the JSON formatted session data to disk
99
109
  # and compare it with the expected JSON file from testdata dir
100
- with open(pathSSFZ.with_suffix(".ssf.json")) as fdRef, \
101
- tempfile.TemporaryFile("w+") as fdNew:
110
+ with open(pathSSFZ.with_suffix(".ssf.json")) as fdRef, tempfile.TemporaryFile(
111
+ "w+"
112
+ ) as fdNew:
102
113
  json.dump(data, fdNew, indent=4)
103
114
  fdNew.seek(0)
104
115
  assert fdRef.read() == fdNew.read()