rainbow-api 1.5.1__tar.gz → 1.5.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 (45) hide show
  1. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/CHANGELOG.md +17 -0
  2. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/PKG-INFO +1 -1
  3. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/pyproject.toml +1 -1
  4. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/chemstation.py +8 -2
  5. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow_api.egg-info/PKG-INFO +1 -1
  6. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/COPYING +0 -0
  7. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/COPYING.LESSER +0 -0
  8. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/MANIFEST.in +0 -0
  9. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/README.md +0 -0
  10. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/__init__.py +0 -0
  11. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/_arguments.py +0 -0
  12. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/_binning.py +0 -0
  13. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/__init__.py +0 -0
  14. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/_chdelta.pyx +0 -0
  15. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/_msprofile.pyx +0 -0
  16. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/_uvdelta.pyx +0 -0
  17. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/acaml.py +0 -0
  18. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/masshunter.py +0 -0
  19. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/method.py +0 -0
  20. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/openlab.py +0 -0
  21. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/agilent/sequence.py +0 -0
  22. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/asm.py +0 -0
  23. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/datadirectory.py +0 -0
  24. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/datafile.py +0 -0
  25. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/datasequence.py +0 -0
  26. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/__init__.py +0 -0
  27. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/_util.py +0 -0
  28. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/chemstation_header.py +0 -0
  29. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/chemstation_text.py +0 -0
  30. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/dotnet.py +0 -0
  31. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/ini.py +0 -0
  32. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/method.py +0 -0
  33. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/mzxml.py +0 -0
  34. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/reg.py +0 -0
  35. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/waters_header.py +0 -0
  36. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/waters_inf.py +0 -0
  37. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/debug/xml.py +0 -0
  38. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/waters/__init__.py +0 -0
  39. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow/waters/masslynx.py +0 -0
  40. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow_api.egg-info/SOURCES.txt +0 -0
  41. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow_api.egg-info/dependency_links.txt +0 -0
  42. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow_api.egg-info/requires.txt +0 -0
  43. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/rainbow_api.egg-info/top_level.txt +0 -0
  44. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/setup.cfg +0 -0
  45. {rainbow_api-1.5.1 → rainbow_api-1.5.2}/setup.py +0 -0
@@ -3,6 +3,23 @@
3
3
  All notable changes to `rainbow-api` are documented here. This project adheres
4
4
  to [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [1.5.2] - 2026-09-09
7
+
8
+ ### Fixed
9
+ - **A ChemStation `.ms` file with busy scans failed to read at all.** Reading
10
+ an Agilent `.D` whose MS scans hold more than 16383 mz-intensity pairs raised
11
+ `ValueError: strides is incompatible with shape of requested array and size
12
+ of buffer`, and nothing in the run could be read. `parse_ms` held each scan's
13
+ pair count in a numpy `uint16` array, so the multiply that turns a pair count
14
+ into a byte count was `uint16` arithmetic and wrapped at 65536: a busy scan
15
+ asked for a fraction of its own bytes, and the reader carried on from inside
16
+ it. numpy 1 widened that multiply and hid the wrap, so this reaches anyone
17
+ who has moved to numpy 2. How busy a scan is tracks how many ions it
18
+ detected, which is why it presented as large or intense files failing while
19
+ smaller ones from the same batch read: in the reported case a run whose
20
+ busiest scan held 12705 pairs read, and one holding 25201 did not. Reported
21
+ with both files in [#75](https://github.com/evanyeyeye/rainbow/issues/75).
22
+
6
23
  ## [1.5.1] - 2026-08-27
7
24
 
8
25
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rainbow-api
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: Read chromatography and mass spectrometry binary files
5
5
  Author: Evan Shi and Eugene Kwan
6
6
  Author-email: evanyshi@cmu.edu
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rainbow-api"
7
- version = "1.5.1"
7
+ version = "1.5.2"
8
8
  description = "Read chromatography and mass spectrometry binary files"
9
9
  readme = "README.md"
10
10
  license = {text = "LGPL-3.0-or-later"}
@@ -842,9 +842,15 @@ def parse_ms(path, display_precision=0, bin_width=1.0, labels_only=False):
842
842
  f.read(2)
843
843
  times[i] = int_unpack(f.read(4))[0]
844
844
  f.read(6)
845
- pair_counts[i] = short_unpack(f.read(2))[0]
845
+ # The multiply below has to happen on a Python int. Read back out of
846
+ # pair_counts it would be a numpy uint16, which wraps at 65536 under
847
+ # NEP 50, so a scan of more than 16383 pairs would ask for its byte
848
+ # count modulo 65536 and the reader would resume inside that scan.
849
+ # numpy 1 widened the multiply to int64, which hid this.
850
+ pair_count = short_unpack(f.read(2))[0]
851
+ pair_counts[i] = pair_count
846
852
  f.read(4)
847
- pair_bytes = f.read(pair_counts[i] * 4)
853
+ pair_bytes = f.read(pair_count * 4)
848
854
  pair_bytearr.extend(pair_bytes)
849
855
  f.read(10)
850
856
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rainbow-api
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: Read chromatography and mass spectrometry binary files
5
5
  Author: Evan Shi and Eugene Kwan
6
6
  Author-email: evanyshi@cmu.edu
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes