Skip to content

Commit 5794067

Browse files
authored
Merge pull request #55 from dj-sciops/dev2
add(LFP): execution duration attribute
2 parents dcfa819 + 0234cd2 commit 5794067

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.5.1] - 2025-04-23
7+
8+
- Add - `execution_duration` to `LFP` table
9+
610
## [0.5.0] - 2025-04-01
711

812
- Add - add `SIExport` in `ephys_sorter` schema

element_array_ephys/ephys_no_curation.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import importlib
22
import inspect
33
import pathlib
4+
from datetime import timedelta, datetime, timezone
45

56
import datajoint as dj
67
import numpy as np
@@ -230,6 +231,7 @@ class LFP(dj.Imported):
230231
-> EphysSession
231232
---
232233
lfp_sampling_rate : float # Down-sampled sampling rate (Hz).
234+
execution_duration : float # execution duration in hours
233235
"""
234236

235237
class Trace(dj.Part):
@@ -250,6 +252,8 @@ def key_source(self):
250252
)
251253

252254
def make(self, key):
255+
execution_time = datetime.now(timezone.utc)
256+
253257
TARGET_SAMPLING_RATE = 2500 # Hz
254258
POWERLINE_NOISE_FREQ = 60 # Hz
255259
LFP_DURATION = 30 # minutes
@@ -386,6 +390,16 @@ def make(self, key):
386390
}
387391
)
388392

393+
self.update1(
394+
{
395+
**key,
396+
"execution_duration": (
397+
datetime.now(timezone.utc) - execution_time
398+
).total_seconds()
399+
/ 3600,
400+
}
401+
)
402+
389403

390404
# ------------ Clustering --------------
391405

element_array_ephys/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package metadata."""
22

3-
__version__ = "0.5.0"
3+
__version__ = "0.5.1"

0 commit comments

Comments
 (0)