Skip to content

Commit

Permalink
Add warning if no systime
Browse files Browse the repository at this point in the history
  • Loading branch information
edeno committed Nov 19, 2021
1 parent 38bd578 commit 9e764e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rec_to_binaries/adjust_timestamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
from rec_to_binaries.read_binaries import (readTrodesExtractedDataFile,
write_trodes_extracted_datafile)
from scipy.stats import linregress
from logging import getLogger


logger = getLogger(__name__)


def _label_time_chunks(trodestime):
Expand Down Expand Up @@ -109,7 +113,8 @@ def fix_timestamp_lag(continuoustime_filename):
data_file = readTrodesExtractedDataFile(continuoustime_filename)

if 'systime' not in data_file['data'].dtype.names:
# logging.warn
logger.warn("No `systime`. Inferring from `system_time_at_creation` timestamp"
" as a function of the `clockrate` and `trodestime`")
new_data = infer_systime(data_file)
else:
new_data = (
Expand Down

0 comments on commit 9e764e9

Please sign in to comment.