How to use the nixio.Value function in nixio

To help you get started, we’ve selected a few nixio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SpikeInterface / spikeextractors / spikeextractors / extractors / nixioextractors / nixioextractors.py View on Github external
#             |
        #             `---- Other property b (nix.Property)
        traces_md = nf.create_section("traces.metadata",
                                      "spikeinterface.properties")
        da.metadata = traces_md
        channels = recording.get_channel_ids()
        for chan_id in channels:
            chan_md = traces_md.create_section(str(chan_id),
                                               "spikeinterface.properties")
            for propname in recording.get_channel_property_names(chan_id):
                propvalue = recording.get_channel_property(chan_id, propname)
                if nf.version <= (1, 1, 0):
                    if isinstance(propvalue, Iterable):
                        values = list(map(nix.Value, propvalue))
                    else:
                        values = nix.Value(propvalue)
                else:
                    values = propvalue
                chan_md.create_property(propname, values)

        nf.close()
github SpikeInterface / spikeextractors / spikeextractors / extractors / nixioextractors / nixioextractors.py View on Github external
spikes_md = nf.create_section("spikes.metadata",
                                      "spikeinterface.properties")
        for da in spikes_das:
            da.metadata = spikes_md

        units = sorting.get_unit_ids()
        for unit_id in units:
            unit_md = spikes_md.create_section(str(unit_id),
                                               "spikeinterface.properties")
            for propname in sorting.get_unit_property_names(unit_id):
                propvalue = sorting.get_unit_property(unit_id, propname)
                if nf.version <= (1, 1, 0):
                    if isinstance(propvalue, Iterable):
                        values = list(map(nix.Value, propvalue))
                    else:
                        values = nix.Value(propvalue)
                else:
                    values = propvalue
                unit_md.create_property(propname, values)

        nf.close()

nixio

Python reimplementation of NIXIO (http://g-node.github.io/nix/)

BSD-2-Clause
Latest version published 2 days ago

Package Health Score

65 / 100
Full package analysis