Skip to content

Releases: BUNPC/snirf2bids

v0.7.7

01 May 20:06
Compare
Choose a tag to compare

Fix file naming issue for optodes and coordinate system when mutliple runs are present in the same nirs folder.

v0.7.6

27 Mar 19:10
Compare
Choose a tag to compare
  • Fix an error when stimulus information is empty in the snirf file.

v0.6.7

15 Jul 15:19
Compare
Choose a tag to compare
  • 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 and PhysioChannels 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

10 Jun 19:30
133983c
Compare
Choose a tag to compare
  • Removed Excel-style carriage return from TSV output
  • Added UTF-8 rtf print to tests

v0.5.1

02 Jun 17:36
25366c1
Compare
Choose a tag to compare
  • Updated SNIRF interface
  • Test which runs snirf2json on 3 files and pretty prints output. Not a real test but will make sure things don't crash
  • Fix to *_optodes.tsv generation
  • Removed entity key-values from snirf2json output.

v0.4.1

19 May 23:41
ecf7c60
Compare
Choose a tag to compare

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 given sub- 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 in make_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 and subinfo properties to entities where appropriate.
  • Widely removed the '-' from keys on entities i.e. 'sub-' -> 'sub'
  • Renamed json_export method on SnirfRun to the more accurate export_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 uses export_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 a csv.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.