How to use the hdmf.utils.popargs function in hdmf

To help you get started, we’ve selected a few hdmf 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 NeurodataWithoutBorders / pynwb / src / pynwb / ecephys.py View on Github external
def __init__(self, **kwargs):
        call_docval_func(super(ElectrodeGroup, self).__init__, kwargs)
        description, location, device = popargs("description", "location", "device", kwargs)
        self.description = description
        self.location = location
        self.device = device
github NeurodataWithoutBorders / pynwb / src / pynwb / ecephys.py View on Github external
def __init__(self, **kwargs):
        detection_method, source_electricalseries, source_idx, times = popargs(
            'detection_method', 'source_electricalseries', 'source_idx', 'times', kwargs)
        super(EventDetection, self).__init__(**kwargs)
        self.detection_method = detection_method
        self.source_electricalseries = source_electricalseries
        self.source_idx = source_idx
        self.times = times
        self.unit = 'seconds'
github NeurodataWithoutBorders / pynwb / src / pynwb / base.py View on Github external
def __init__(self, **kwargs):
        call_docval_func(super(ProcessingModule, self).__init__, kwargs)
        self.description = popargs('description', kwargs)
        self.data_interfaces = popargs('data_interfaces', kwargs)
github NeurodataWithoutBorders / pynwb / src / pynwb / base.py View on Github external
def __init__(self, **kwargs):
        name, description, images = popargs('name', 'description', 'images', kwargs)
        super(Images, self).__init__(name, **kwargs)
        self.description = description
        self.images = images
github NeurodataWithoutBorders / pynwb / src / pynwb / __init__.py View on Github external
def __init__(self, **kwargs):
        path, mode, manager, extensions, load_namespaces, file_obj, comm =\
            popargs('path', 'mode', 'manager', 'extensions', 'load_namespaces', 'file', 'comm', kwargs)
        if load_namespaces:
            if manager is not None:
                warn("loading namespaces from file - ignoring 'manager'")
            if extensions is not None:
                warn("loading namespaces from file - ignoring 'extensions' argument")
            if 'w' in mode:
                raise ValueError("cannot load namespaces from file when writing to it")

            # XXX: Leaving this here in case we want to revert to this strategy for
            #      loading cached namespaces
            # ns_catalog = NamespaceCatalog(NWBGroupSpec, NWBDatasetSpec, NWBNamespace)
            # super(NWBHDF5IO, self).load_namespaces(ns_catalog, path)
            # tm = TypeMap(ns_catalog)
            # tm.copy_mappers(get_type_map())

            tm = get_type_map()
github NeurodataWithoutBorders / pynwb / src / pynwb / base.py View on Github external
def __init__(self, **kwargs):
        name, description, images = popargs('name', 'description', 'images', kwargs)
        super(Images, self).__init__(name, **kwargs)
        self.description = description
        self.images = images
github NeurodataWithoutBorders / pynwb / src / pynwb / misc.py View on Github external
def __init__(self, **kwargs):
        name, data, timestamps = popargs('name', 'data', 'timestamps', kwargs)
        self.__interval_timestamps = timestamps
        self.__interval_data = data
        super(IntervalSeries, self).__init__(name, data, 'n/a', resolution=-1.0, timestamps=timestamps, **kwargs)
github NeurodataWithoutBorders / pynwb / src / pynwb / ecephys.py View on Github external
def __init__(self, **kwargs):
        name, electrodes, data, channel_conversion = popargs('name', 'electrodes', 'data', 'channel_conversion', kwargs)
        super(ElectricalSeries, self).__init__(name, data, 'volts', **kwargs)
        self.electrodes = electrodes
        self.channel_conversion = channel_conversion
github NeurodataWithoutBorders / pynwb / src / pynwb / ecephys.py View on Github external
def __init__(self, **kwargs):
        import warnings
        warnings.warn("use pynwb.misc.Units or NWBFile.units instead", DeprecationWarning)
        description, num, peak_over_rms, times = popargs(
            'description', 'num', 'peak_over_rms', 'times', kwargs)
        super(Clustering, self).__init__(**kwargs)
        self.description = description
        self.num = num
        self.peak_over_rms = list(peak_over_rms)
        self.times = times
github NeurodataWithoutBorders / pynwb / src / pynwb / image.py View on Github external
def __init__(self, **kwargs):
        bits_per_pixel, dimension, external_file, starting_frame, format = popargs(
            'bits_per_pixel', 'dimension', 'external_file', 'starting_frame', 'format', kwargs)
        call_docval_func(super(ImageSeries, self).__init__, kwargs)
        if external_file is None and self.data is None:
            raise ValueError("Must supply either external_file or data to %s '%s'."
                             % (self.__class__.__name__, self.name))
        self.bits_per_pixel = bits_per_pixel
        self.dimension = dimension
        self.external_file = external_file
        if external_file is not None:
            self.starting_frame = starting_frame
        else:
            self.starting_frame = None
        self.format = format