ZaksPhysicsLibrary 1.3.0__tar.gz → 1.4.0__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.
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PKG-INFO +1 -1
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/processing_TDT.py +28 -4
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/PKG-INFO +1 -1
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/pyproject.toml +1 -1
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/LICENSE +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/__init__.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/analysis.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/dataset.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/file_parser.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/file_parser_generic.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/loaders/__init__.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/loaders/oxysoft_loader.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/loaders/pt2_loader.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/loaders/tdt_loader.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/models.py +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/README.md +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/SOURCES.txt +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/dependency_links.txt +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/requires.txt +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/top_level.txt +0 -0
- {zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/setup.cfg +0 -0
|
@@ -278,10 +278,19 @@ def get_event_markers(data):
|
|
|
278
278
|
toggle each store's markers independently instead of dumping every
|
|
279
279
|
store onto the plot at once (which overlaps into an unreadable mess).
|
|
280
280
|
|
|
281
|
+
Every epoc is a state that goes high (onset) and later low (offset) —
|
|
282
|
+
for a lever press that's press/release, for a pump or light that's
|
|
283
|
+
on/off. Both are emitted here, each tagged with a 'phase' key ('high'
|
|
284
|
+
for onset, 'low' for offset), so a caller can decide per store whether
|
|
285
|
+
it cares about both edges (e.g. how long the pump ran) or only one
|
|
286
|
+
(e.g. just the press, not the release) instead of that decision being
|
|
287
|
+
baked into the library.
|
|
288
|
+
|
|
281
289
|
The 'Note' store keeps its original behaviour: each onset becomes a
|
|
282
|
-
marker labeled with the actual note text (from Notes.txt),
|
|
283
|
-
|
|
284
|
-
|
|
290
|
+
marker labeled with the actual note text (from Notes.txt), and has no
|
|
291
|
+
offset/'low' marker — free-text annotations are instantaneous, not a
|
|
292
|
+
state with a duration. Every other epoc store gets one 'high' marker
|
|
293
|
+
per onset and one 'low' marker per offset, both labeled with the store
|
|
285
294
|
name.
|
|
286
295
|
|
|
287
296
|
Nothing about which stores exist is hardcoded — this walks whatever
|
|
@@ -294,7 +303,8 @@ def get_event_markers(data):
|
|
|
294
303
|
- time : float
|
|
295
304
|
- label : str
|
|
296
305
|
- color : str
|
|
297
|
-
- store : str
|
|
306
|
+
- store : str (source epoc store name, for grouping/toggling)
|
|
307
|
+
- phase : str ('high'=onset, 'low'=offset; omitted for Note markers)
|
|
298
308
|
"""
|
|
299
309
|
if not hasattr(data, 'epocs'):
|
|
300
310
|
return []
|
|
@@ -336,6 +346,20 @@ def get_event_markers(data):
|
|
|
336
346
|
'label': display_name,
|
|
337
347
|
'color': color,
|
|
338
348
|
'store': display_name,
|
|
349
|
+
'phase': 'high',
|
|
350
|
+
})
|
|
351
|
+
offsets = getattr(epoc, 'offset', [])
|
|
352
|
+
for t in offsets:
|
|
353
|
+
# TDT represents a strobe still active at recording end with
|
|
354
|
+
# offset=inf — not a real timestamp, nothing to plot.
|
|
355
|
+
if not np.isfinite(t):
|
|
356
|
+
continue
|
|
357
|
+
markers.append({
|
|
358
|
+
'time': float(t),
|
|
359
|
+
'label': display_name,
|
|
360
|
+
'color': color,
|
|
361
|
+
'store': display_name,
|
|
362
|
+
'phase': 'low',
|
|
339
363
|
})
|
|
340
364
|
|
|
341
365
|
return markers
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ZaksPhysicsLibrary"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.4.0"
|
|
8
8
|
description = "Data processing and analysis library for TDT, Oxysoft NIRS, and Terranova EFNMR lab data"
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/PhysicsLibrary/loaders/oxysoft_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/requires.txt
RENAMED
|
File without changes
|
{zaksphysicslibrary-1.3.0 → zaksphysicslibrary-1.4.0}/ZaksPhysicsLibrary.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|