naluacq 0.4.9__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.
- naluacq-0.4.9/.github/workflows/CI.yml +169 -0
- naluacq-0.4.9/.github/workflows/crate.yml +23 -0
- naluacq-0.4.9/.gitignore +19 -0
- naluacq-0.4.9/CHANGELOG.md +115 -0
- naluacq-0.4.9/Cargo.lock +802 -0
- naluacq-0.4.9/Cargo.toml +30 -0
- naluacq-0.4.9/LICENSE.txt +165 -0
- naluacq-0.4.9/PKG-INFO +100 -0
- naluacq-0.4.9/README.md +87 -0
- naluacq-0.4.9/naluacq.pyi +134 -0
- naluacq-0.4.9/pyproject.toml +16 -0
- naluacq-0.4.9/src/acquisition/chunk.rs +392 -0
- naluacq-0.4.9/src/acquisition/constants.rs +11 -0
- naluacq-0.4.9/src/acquisition/mod.rs +423 -0
- naluacq-0.4.9/src/acquisition/util.rs +74 -0
- naluacq-0.4.9/src/calibration/mod.rs +94 -0
- naluacq-0.4.9/src/calibration/pedestals.rs +118 -0
- naluacq-0.4.9/src/ecc/mod.rs +6 -0
- naluacq-0.4.9/src/ecc/upac96.rs +84 -0
- naluacq-0.4.9/src/error.rs +139 -0
- naluacq-0.4.9/src/export/csv.rs +329 -0
- naluacq-0.4.9/src/export/mod.rs +15 -0
- naluacq-0.4.9/src/lib.rs +139 -0
- naluacq-0.4.9/src/parsing/aardvarcv3.rs +246 -0
- naluacq-0.4.9/src/parsing/aodsoc.rs +126 -0
- naluacq-0.4.9/src/parsing/aodsv2.rs +60 -0
- naluacq-0.4.9/src/parsing/asocv3.rs +179 -0
- naluacq-0.4.9/src/parsing/asocv3s.rs +248 -0
- naluacq-0.4.9/src/parsing/hdsocv1.rs +208 -0
- naluacq-0.4.9/src/parsing/mod.rs +64 -0
- naluacq-0.4.9/src/parsing/trbhmv1.rs +140 -0
- naluacq-0.4.9/src/parsing/udc16.rs +138 -0
- naluacq-0.4.9/src/parsing/upac96.rs +205 -0
- naluacq-0.4.9/src/parsing/util.rs +121 -0
- naluacq-0.4.9/src/python_api/acquisition.rs +294 -0
- naluacq-0.4.9/src/python_api/exceptions.rs +78 -0
- naluacq-0.4.9/src/python_api/export.rs +43 -0
- naluacq-0.4.9/src/python_api/mod.rs +28 -0
- naluacq-0.4.9/src/python_api/parsing.rs +40 -0
- naluacq-0.4.9/src/python_api/python_libs.rs +44 -0
- naluacq-0.4.9/src/python_api/upac_ecc.rs +214 -0
- naluacq-0.4.9/src/util.rs +25 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- 'v**'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
linux:
|
|
10
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
platform:
|
|
14
|
+
- runner: ubuntu-latest
|
|
15
|
+
target: x86_64
|
|
16
|
+
- runner: ubuntu-latest
|
|
17
|
+
target: x86
|
|
18
|
+
- runner: ubuntu-latest
|
|
19
|
+
target: aarch64
|
|
20
|
+
- runner: ubuntu-latest
|
|
21
|
+
target: armv7
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: 3.x
|
|
27
|
+
- name: Build wheels
|
|
28
|
+
uses: PyO3/maturin-action@v1
|
|
29
|
+
with:
|
|
30
|
+
target: ${{ matrix.platform.target }}
|
|
31
|
+
args: --release --out dist --find-interpreter
|
|
32
|
+
sccache: 'true'
|
|
33
|
+
manylinux: auto
|
|
34
|
+
- name: Upload wheels
|
|
35
|
+
uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
38
|
+
path: dist
|
|
39
|
+
|
|
40
|
+
windows:
|
|
41
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
42
|
+
strategy:
|
|
43
|
+
matrix:
|
|
44
|
+
platform:
|
|
45
|
+
- runner: windows-latest
|
|
46
|
+
target: x64
|
|
47
|
+
- runner: windows-latest
|
|
48
|
+
target: x86
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
- uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: 3.x
|
|
54
|
+
architecture: ${{ matrix.platform.target }}
|
|
55
|
+
- name: Build wheels
|
|
56
|
+
uses: PyO3/maturin-action@v1
|
|
57
|
+
with:
|
|
58
|
+
target: ${{ matrix.platform.target }}
|
|
59
|
+
args: --release --out dist --find-interpreter
|
|
60
|
+
sccache: 'true'
|
|
61
|
+
- name: Upload wheels
|
|
62
|
+
uses: actions/upload-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
65
|
+
path: dist
|
|
66
|
+
|
|
67
|
+
macos:
|
|
68
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
69
|
+
strategy:
|
|
70
|
+
matrix:
|
|
71
|
+
platform:
|
|
72
|
+
- runner: macos-14
|
|
73
|
+
target: aarch64
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- uses: actions/setup-python@v5
|
|
77
|
+
with:
|
|
78
|
+
python-version: 3.x
|
|
79
|
+
- name: Build wheels
|
|
80
|
+
uses: PyO3/maturin-action@v1
|
|
81
|
+
with:
|
|
82
|
+
target: ${{ matrix.platform.target }}
|
|
83
|
+
args: --release --out dist --find-interpreter
|
|
84
|
+
sccache: 'true'
|
|
85
|
+
- name: Upload wheels
|
|
86
|
+
uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
89
|
+
path: dist
|
|
90
|
+
|
|
91
|
+
sdist:
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
|
+
- name: Build sdist
|
|
96
|
+
uses: PyO3/maturin-action@v1
|
|
97
|
+
with:
|
|
98
|
+
command: sdist
|
|
99
|
+
args: --out dist
|
|
100
|
+
- name: Upload sdist
|
|
101
|
+
uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: wheels-sdist
|
|
104
|
+
path: dist
|
|
105
|
+
|
|
106
|
+
release:
|
|
107
|
+
name: Release
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
110
|
+
needs: [linux, windows, macos, sdist]
|
|
111
|
+
permissions:
|
|
112
|
+
# Use to sign the release artifacts
|
|
113
|
+
id-token: write
|
|
114
|
+
# Used to upload release artifacts
|
|
115
|
+
contents: write
|
|
116
|
+
steps:
|
|
117
|
+
- uses: actions/download-artifact@v4
|
|
118
|
+
with:
|
|
119
|
+
name: wheels-linux-x86_64
|
|
120
|
+
path: dist
|
|
121
|
+
- uses: actions/download-artifact@v4
|
|
122
|
+
with:
|
|
123
|
+
name: wheels-linux-x86
|
|
124
|
+
path: dist
|
|
125
|
+
- uses: actions/download-artifact@v4
|
|
126
|
+
with:
|
|
127
|
+
name: wheels-linux-aarch64
|
|
128
|
+
path: dist
|
|
129
|
+
- uses: actions/download-artifact@v4
|
|
130
|
+
with:
|
|
131
|
+
name: wheels-linux-armv7
|
|
132
|
+
- uses: actions/download-artifact@v4
|
|
133
|
+
with:
|
|
134
|
+
name: wheels-windows-x64
|
|
135
|
+
path: dist
|
|
136
|
+
|
|
137
|
+
- uses: actions/download-artifact@v4
|
|
138
|
+
with:
|
|
139
|
+
name: wheels-windows-x86
|
|
140
|
+
path: dist
|
|
141
|
+
- uses: actions/download-artifact@v4
|
|
142
|
+
with:
|
|
143
|
+
name: wheels-macos-aarch64
|
|
144
|
+
path: dist
|
|
145
|
+
- uses: actions/download-artifact@v4
|
|
146
|
+
with:
|
|
147
|
+
name: wheels-sdist
|
|
148
|
+
path: dist
|
|
149
|
+
|
|
150
|
+
- name: List dist contents
|
|
151
|
+
run: find dist -type f
|
|
152
|
+
|
|
153
|
+
- name: Publish to PyPI
|
|
154
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
155
|
+
uses: PyO3/maturin-action@v1
|
|
156
|
+
env:
|
|
157
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
158
|
+
with:
|
|
159
|
+
command: upload
|
|
160
|
+
args: --non-interactive --skip-existing dist/*
|
|
161
|
+
|
|
162
|
+
- name: Upload to GitHub Release
|
|
163
|
+
uses: softprops/action-gh-release@v1
|
|
164
|
+
with:
|
|
165
|
+
tag_name: ${{ github.ref_name }}
|
|
166
|
+
name: Release ${{ github.ref_name }}
|
|
167
|
+
draft: false
|
|
168
|
+
prerelease: false
|
|
169
|
+
files: dist/*
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Publish to crates.io
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v**'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish-crate:
|
|
12
|
+
name: Publish (crates.io)
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
17
|
+
|
|
18
|
+
- name: cargo login
|
|
19
|
+
run: cargo login ${{ secrets.CARGO_API_TOKEN }}
|
|
20
|
+
|
|
21
|
+
- name: cargo publish
|
|
22
|
+
run: |
|
|
23
|
+
cargo publish --all-features
|
naluacq-0.4.9/.gitignore
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.vscode/
|
|
2
|
+
|
|
3
|
+
# Test data
|
|
4
|
+
test_data/
|
|
5
|
+
|
|
6
|
+
# Generated by Cargo
|
|
7
|
+
# will have compiled files and executables
|
|
8
|
+
debug/
|
|
9
|
+
target/
|
|
10
|
+
|
|
11
|
+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
12
|
+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
13
|
+
Cargo.lock
|
|
14
|
+
|
|
15
|
+
# These are backup files generated by rustfmt
|
|
16
|
+
**/*.rs.bk
|
|
17
|
+
|
|
18
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
19
|
+
*.pdb
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.4.9] - 2025-06-30
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- ADD: ECC checking and correction for UPAC96 data.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.4.8] - 2025-06-20
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Algorithm for calculating time axis offset now uses timing field instead of window labels to determine offset.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.4.7] - 2025-06-16
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- The HDSoCv1 parser only checked the first two samples of a window to determine whether to include the packages. This caused problems at higher input levels when the data rolls over to zero.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.4.6] - 2025-05-30
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- HDSoCv2 parsing bug where the package length was set to the wrong value, this caused the parser to return an MissingDataError
|
|
35
|
+
- Parse HDSOCv2 data using HDSOCv1 parser with correct parameters
|
|
36
|
+
- CSV exporter now skips writing channels that have bad data
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- Added a new PackageEmpty Error type where an entire package is missing.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## [0.4.5] - 2024-08-19
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- AARDVARCv3 now baes event num channels on maximum channels instead of num parsed channels. Fixing issue with channel numbering.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [0.4.4] - 2024-04-09
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- Pedestals CSV export
|
|
55
|
+
|
|
56
|
+
## [0.4.3] - 2024-04-09
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- Typo in Be/Le code in utils.rs caused UPAC96 parsing to be wrong.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## [0.4.2] - 2024-03-27
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- NaluAcq Error types for IO errors.
|
|
68
|
+
- Parser for ASoCv3S events.
|
|
69
|
+
|
|
70
|
+
## [0.4.1] - 2023-08-31
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- Utilities for combining u8s into u16s are now iterator extensions.
|
|
75
|
+
- Some I/O errors now have better descriptions
|
|
76
|
+
- Limited precision of pedestals-corrected CSV data to 1 decimal place to reduce file size.
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
80
|
+
- Python bindings for CSV export held the GIL unnecessarily long, blocking other Python threads.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## [0.4.0] - 2023-08-27
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- UPAC96 data format.
|
|
88
|
+
- UDC16 data format.
|
|
89
|
+
|
|
90
|
+
## [0.3.1] - 2023-08-10
|
|
91
|
+
|
|
92
|
+
### Fixed
|
|
93
|
+
|
|
94
|
+
- Data was indexed improperly by the CSV exporter. Data with disabled channels caused panics.
|
|
95
|
+
|
|
96
|
+
## [0.3.0] - 2023-08-09
|
|
97
|
+
|
|
98
|
+
### Added
|
|
99
|
+
|
|
100
|
+
- Python bindings
|
|
101
|
+
|
|
102
|
+
## [0.2.0] - 2023-07-25
|
|
103
|
+
|
|
104
|
+
### Added
|
|
105
|
+
|
|
106
|
+
- Parser for TRBHMv1 events.
|
|
107
|
+
|
|
108
|
+
## [0.1.0] - 2023-07-25
|
|
109
|
+
|
|
110
|
+
Initial release.
|
|
111
|
+
|
|
112
|
+
### Added
|
|
113
|
+
|
|
114
|
+
- Parsers for HDSoCv1 and AARDVARCv3 events.
|
|
115
|
+
- CSV export.
|