Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert msec to sec for ECAT to BIDS json #230

Merged
merged 4 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The following individuals have contributed to the PET2BIDS project (in alphabetical order). If you contributed and
some icons needs to be added or your name is not listed, please add it.

Murat Bilgel 💻 🐛 💡
Anthony Galassi 💻 📖 💬 🎨 💡 ⚠️
Melanie Ganz-Benjaminsen 🔍 💬 🤔 📋
Gabriel Gonzalez-Escamilla 💻 ⚠️ 🐛 👀
Expand Down
3 changes: 3 additions & 0 deletions pypet2bids/pypet2bids/read_ecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def get_header_data(header_data_map: dict, ecat_file: str = '', byte_offset: int
header[variable_name] = struct.unpack(struct_fmt, raw_bytes)
if clean and 'fill' not in variable_name.lower():
header[variable_name] = filter_bytes(header[variable_name], struct_fmt)
if 'comment' in value and 'msec' in value['comment']:
# for entries that are in msec, convert to sec for PET BIDS json
header[variable_name] /= 1000
read_head_position = relative_byte_position + byte_width

return header, read_head_position
Expand Down
2 changes: 1 addition & 1 deletion pypet2bids/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pypet2bids"
version = "1.2.7"
version = "1.2.8"
description = "A python implementation of an ECAT to BIDS converter."
authors = ["anthony galassi <[email protected]>"]
license = "MIT"
Expand Down
Loading