Coder Social home page Coder Social logo

hsupipeline / convnwb Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 1.07 MB

A module of helper code for converting data files to NWB.

Home Page: https://hsupipeline.github.io/convnwb/

License: MIT License

Python 97.73% Makefile 2.27%
experiments human-data nwb nwb-conversion single-unit

convnwb's Issues

[?] Unit times file names

Currently the function save_units saves the h5 times files adding a ch before the channel name. However, because the channel names are already chan_\d\d\d, for example, the units spike times h5 files end up saved as times_chan_chan_\d\d\d_u\d.h5.

save_to_h5file(unit, 'times_chan_{}_u{}'.format(unit['channel'], unit['ind']), folder)

0.2.0 release

Note - ideas for 0.2.0 that were here became a bit outdated. Closing this.

0.1.0 release

Finalizing touches for a 0.1.0 release to tag:

  • re-organize module
  • describe base organization
  • add changelog
  • tag release

Make some dependencies optional

There are a couple dependencies that are only used for very specific things, and could be made optional, in order to keep with tool as something lightweight / easy to install.

Dependencies to make optional:

  • pynwb
  • sklearn

Paths / DB

Need to reconcile / choose a strategy between the SDB object here, and the Paths definitions currently used in Convert T3 & TH.

Support for Nested Subfolder Creation in create_session_directory

I noticed that while create_session_directory supports the creation of subdirectories within a session, it does not currently support the creation of nested subfolders within those subdirectories.

For example, I am trying to adapt SESSION_FOLDERS to contain 00_origiSeshs, with subfolders origSesh00 to origSesh09, and each of these subfolders should contain additional subfolders named "behavior", "neural", and "audio". The current implementation creates the origSeshXX subfolders correctly but does not create the further nested folders.

I think this could be implemented by adding at the end of the function:

for nested_subfolder in nested_subfolders:
    make_folder(recordings_path / subject / experiment / session / subdir / subfolder / nested_subfolder)

[MNT] - Warning on scipy.stats.mode

As of scipy version 1.9.0, there is a new 'keepdims' argument in scipy.stats.mode that needs to be set for future-proofing, and will start to fail in scipy version 1.11.0: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.mode.html

This relates to the use of scipy.stats.mode here:
https://github.com/HSUPipeline/convnwb/blob/main/convnwb/timestamps/align.py#L168

For future scipy usage, this could be updated to:
ixis_mode = stats.mode(ixis, keepdims=True)[0][0]

Or, equivalent updates:
ixis_mode = stats.mode(ixis, keepdims=True).mode[0]
ixis_mode = stats.mode(ixis, keepdims=False).mode

Basically - the fix is easy, but need to decide whether to enforce a specific version of scipy, and/or do a version check.

Roadmap to 1.0

ToDo's for moving to 1.0 release version:

  • rename to hsntools

Post 1.0 ready:

  • release on PYPI
  • recreate docs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.