TheLabbingProject / django_mri

A reusable Django app to manage MRI data.
https://django-mri.readthedocs.io/en/latest/
Apache License 2.0
7 stars 5 forks source link

Refactor Bids class #72

Closed ZviBaratz closed 2 years ago

ZviBaratz commented 3 years ago

Sequence/modality deduction could be tidier and more comprehensive (?).

ZviBaratz commented 3 years ago

@GalBenZvi We should probably both add more sequences to the django_mri.models.common_sequences module and refactor the Bids class to be more flexible. Currently, any scan for which a SequenceType could not be inferred (or Bids doesn't know how to handle its sequence type) raises an exception when converted to NIfTI. We should probably return this to simply use some default non-BIDS directory structure in these cases, but of course the best option is for the Bids class to manage to handle as many scan types as possible.

ZviBaratz commented 3 years ago

No longer a bug in our use case after f9af405, but should still be refactored to be more robust.