Skip to content

Fix timestamp conversion in estimate_rr_interval to use pandas datetime method#116

Merged
Pedro Ferreira (Pedro-Filipe) merged 1 commit into
mainfrom
pandas_time_fix
Jun 17, 2026
Merged

Fix timestamp conversion in estimate_rr_interval to use pandas datetime method#116
Pedro Ferreira (Pedro-Filipe) merged 1 commit into
mainfrom
pandas_time_fix

Conversation

@Pedro-Filipe

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates estimate_rr_interval to convert acquisition timestamps using a pandas datetime accessor rather than directly casting to int64.

Changes:

  • Switch timestamp conversion to Series.dt.as_unit("ms") before converting to integers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 528 to +530
if not (data["acquisition_date_time"] == "None").all():
# convert time to miliseconds
time_stamps = data["acquisition_date_time"].astype(np.int64) / int(1e6)
time_stamps = data["acquisition_date_time"].dt.as_unit("ms").astype(np.int64)
Comment on lines 528 to +530
if not (data["acquisition_date_time"] == "None").all():
# convert time to miliseconds
time_stamps = data["acquisition_date_time"].astype(np.int64) / int(1e6)
time_stamps = data["acquisition_date_time"].dt.as_unit("ms").astype(np.int64)
@Pedro-Filipe Pedro Ferreira (Pedro-Filipe) merged commit a23a3e9 into main Jun 17, 2026
2 checks passed
@Pedro-Filipe Pedro Ferreira (Pedro-Filipe) deleted the pandas_time_fix branch June 17, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants