Releases: BUNPC/snirf2bids
Releases · BUNPC/snirf2bids
v0.7.7
v0.7.6
- Fix an error when stimulus information is empty in the snirf file.
v0.6.7
- Fixed MANIFEST import. Note that previous 0.6.X releases were pulled because they could not be installed via pip.
- Fixed issue which caused NIRSSourceOptodeCount and NIRSDetectorOptodeCount to be updated incorrectly in _nirs.json file
- Support for AnatomicalLandmarkCoordinates
- New schema format which is hierarchical
- Schema is loaded into memory with the library
- Header export is optional from TSV classes
Physio
class andPhysioChannels
class support the creation of a batch of"*_physio.tsv"
files from a SNIRF file's aux channels- Changes to test print format
v0.5.2
v0.5.1
v0.4.1
User changelog
- Fixes to .tsv export
- Filenames returned by
snirf2json
now share the entities of the input file in all cases: files like*_coordsystem.json
are givensub-
entities only in the interest of inheritance.*_participants.tsv
is named this way as well, which is not typical of BIDS, but will serve to help us validate between SNIRF files which should share subject information but may not. - The entities of the input filename are reordered like so:
sub-<...>_ses-<...>_task_<...>_[all other entities i.e. 'acq-']_run-<...>
Developer changelog
- Refactored
_pull_label
into_extract_entities_from_filename
which returns dict of all entity-value pairs in a given name. Client code calls this once and then operates on the dict. - Refactored
_make_filename
inmake_filename_prefix
which operates on entity-value dict returned by new extract function. This was possible because we are no longer worried about parsing BIDS structures to determine inheritance levels, so the original solution was unnecessary. pull_fnames
no longer cares about BIDS inheritance and so just creates dict of output file names keyed by the internal identifiers i.e. 'optodes', 'sidecar' from the entities dict.- Removed unused
_compliancy_check
. Validation code will not be included in this library. - Renamed
info
andsubinfo
properties toentities
where appropriate. - Widely removed the
'-'
from keys on entities i.e.'sub-'
->'sub'
- Renamed
json_export
method onSnirfRun
to the more accurateexport_to_dict
. - Now dump all JSON objects to strings before packing them into the dict returned from
export_to_dict
. Do not dump the return value, which remains a dict. snirf2bids
now usesexport_to_dict
to write its files. This removes redundant export code, avoiding the case where the serial output differs from the files written to disk.- Fix to
TSV.get_all_fields
by using acsv.writer
to serialize the table rather than a manual loop which did not work properly to generate some files (namely *_optodes.tsv) snirf2bids
now places files alongside SNIRF file input.- TODO resolve SNIRF file closing issues in IPython environments. This is not a problem with this code but if pysnirf2 is not used carefully files may be left open.