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

ENH: Use AcquisitionTime for acq_time scans file field #459

Merged
merged 5 commits into from
Aug 3, 2020

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Jun 19, 2020

Closes #450.

Changes proposed:

  • Change ContentTime to AcquisitionTime for acq_time field in scans file.
  • Change ContentDate to AcquisitionDate for acq_time field in scans file.

@codecov
Copy link

codecov bot commented Jun 20, 2020

Codecov Report

Merging #459 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #459   +/-   ##
=======================================
  Coverage   76.12%   76.13%           
=======================================
  Files          37       37           
  Lines        2961     2962    +1     
=======================================
+ Hits         2254     2255    +1     
  Misses        707      707           
Impacted Files Coverage Δ
heudiconv/bids.py 82.97% <100.00%> (ø)
heudiconv/tests/test_main.py 100.00% <100.00%> (ø)
heudiconv/info.py 100.00% <0.00%> (ø)
heudiconv/external/dlad.py 97.67% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4c2dd2...7660e00. Read the comment docs.

@tsalo tsalo requested a review from yarikoptic August 3, 2020 16:29
Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

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

ensure that date/time correspond?

try:
date = dcm_data.ContentDate
time = dcm_data.ContentTime
time = dcm_data.AcquisitionTime
Copy link
Member

Choose a reason for hiding this comment

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

is there AcquisitionDate? very unlikely but still possible that date could be different in some very rare case of scanning around midnight.

Copy link
Member Author

Choose a reason for hiding this comment

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

I do have AcquisitionDate in my dicoms, and the standard has it listed, so I'll switch out ContentDate with AcquisitionDate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be good now.

@yarikoptic
Copy link
Member

Let the heaven not to fall upon our weak heads! ;)

@yarikoptic yarikoptic merged commit d855f64 into nipy:master Aug 3, 2020
@yarikoptic
Copy link
Member

Thank you @tsalo !

@tsalo tsalo deleted the enh/acqtime branch August 3, 2020 21:47
@yarikoptic yarikoptic added this to the 0.9.0 milestone Dec 23, 2020
yarikoptic added a commit that referenced this pull request Dec 23, 2020
Various improvements and compatibility/support (dcm2niix, datalad,
duecredit) changes.  Major change is placement of output files to the
target output directory during conversion.

- #454 zenodo referencing in README.rst and support for ducredit for
  heudiconv and reproin heuristic
- #445 more tutorial references in README.md

- [#485][] placed files during conversion right away into the target
  directory (with a `_heudiconv???` suffix, renamed into ultimate target
  name later on), which avoids hitting file size limits of /tmp ([#481][]) and
  helped to avoid a regression in dcm2nixx 1.0.20201102
- #477 replaced `rec-<magnitude|phase>` with `part-<mag|phase>` now
  that BIDS supports the part entity
- #473 made default for CogAtlasID to be a TODO URL
- #459 made AcquisitionTime used for acq_time scans file field
- #451 retained sub-second resolution in scans files
- #442 refactored code so there is now heudiconv.main.workflow for
  more convenient use as a Python module

- minimal version of nipype set to 1.2.3 to guarantee correct handling
  of DWI files ([#480][])
- `heudiconvDCM*` temporary directories are removed now ([#462][])
- compatibility with DataLad 0.13 ([#464][])

- #443 pathlib as a dependency (we are Python3 only now)

* tag 'v0.9.0':
  Add a helper rule to upload to pypi
  update changelog reference as part of prep release
  [DATALAD RUNCMD] prepare the release
  CHANGELOG entry for 0.9.0
yarikoptic added a commit that referenced this pull request Dec 23, 2020
Various improvements and compatibility/support (dcm2niix, datalad,
duecredit) changes.  Major change is placement of output files to the
target output directory during conversion.

- #454 zenodo referencing in README.rst and support for ducredit for
  heudiconv and reproin heuristic
- #445 more tutorial references in README.md

- [#485][] placed files during conversion right away into the target
  directory (with a `_heudiconv???` suffix, renamed into ultimate target
  name later on), which avoids hitting file size limits of /tmp ([#481][]) and
  helped to avoid a regression in dcm2nixx 1.0.20201102
- #477 replaced `rec-<magnitude|phase>` with `part-<mag|phase>` now
  that BIDS supports the part entity
- #473 made default for CogAtlasID to be a TODO URL
- #459 made AcquisitionTime used for acq_time scans file field
- #451 retained sub-second resolution in scans files
- #442 refactored code so there is now heudiconv.main.workflow for
  more convenient use as a Python module

- minimal version of nipype set to 1.2.3 to guarantee correct handling
  of DWI files ([#480][])
- `heudiconvDCM*` temporary directories are removed now ([#462][])
- compatibility with DataLad 0.13 ([#464][])

- #443 pathlib as a dependency (we are Python3 only now)

* tag 'v0.9.0':
  Do no bother ensuring that version changed - should be no changes
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.

Use AcquisitionTime for acq_time column of scans tsv files
2 participants