How to use the hdmf.utils.call_docval_func 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 / image.py View on Github external
def __init__(self, **kwargs):
        call_docval_func(super(GrayscaleImage, self).__init__, kwargs)
github NeurodataWithoutBorders / pynwb / src / pynwb / core.py View on Github external
def _func(self, **kwargs):
            call_docval_func(super(cls, self).__init__, kwargs)
            for conf in clsconf:
                attr_name = conf['attr']
                add_name = conf['add']
                container = popargs(attr_name, kwargs)
                add = getattr(self, add_name)
                add(container)
        return _func
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 / ophys.py View on Github external
def __init__(self, **kwargs):
        imaging_plane, reference_images = popargs('imaging_plane', 'reference_images', kwargs)
        if kwargs.get('name') is None:
            kwargs['name'] = imaging_plane.name
        columns, colnames = getargs('columns', 'colnames', kwargs)
        call_docval_func(super(PlaneSegmentation, self).__init__, kwargs)
        self.imaging_plane = imaging_plane
        if isinstance(reference_images, ImageSeries):
            reference_images = (reference_images,)
        self.reference_images = reference_images
github NeurodataWithoutBorders / pynwb / src / pynwb / file.py View on Github external
d['group_name'] = d['group'].name

        new_cols = [('rel_x', 'the x coordinate within the electrode group'),
                    ('rel_y', 'the y coordinate within the electrode group'),
                    ('rel_z', 'the z coordinate within the electrode group'),
                    ('reference', 'Description of the reference used for this electrode.')]
        # add column if the arg is supplied and column does not yet exist
        # do not pass arg to add_row if arg is not supplied
        for col_name, col_doc in new_cols:
            if kwargs[col_name] is not None:
                if col_name not in self.electrodes:
                    self.electrodes.add_column(col_name, col_doc)
            else:
                d.pop(col_name)  # remove args from d if not set

        call_docval_func(self.electrodes.add_row, d)
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):
        call_docval_func(super(ElectrodeGroup, self).__init__, kwargs)
        description, location, device, position = popargs('description', 'location', 'device', 'position', kwargs)
        self.description = description
        self.location = location
        self.device = device
        if position and len(position) != 3:
            raise Exception('ElectrodeGroup position argument must have three elements: x, y, z, but received: %s'
                            % position)
        self.position = position
github NeurodataWithoutBorders / pynwb / src / pynwb / file.py View on Github external
def add_invalid_times_column(self, **kwargs):
        """
        Add a column to the trial table.
        See :py:meth:`~hdmf.common.DynamicTable.add_column` for more details
        """
        self.__check_invalid_times()
        call_docval_func(self.invalid_times.add_column, kwargs)
github NeurodataWithoutBorders / pynwb / src / pynwb / file.py View on Github external
def add_unit_column(self, **kwargs):
        """
        Add a column to the unit table.
        See :py:meth:`~hdmf.common.DynamicTable.add_column` for more details
        """
        self.__check_units()
        call_docval_func(self.units.add_column, kwargs)
github NeurodataWithoutBorders / pynwb / src / pynwb / __init__.py View on Github external
def get_manager(**kwargs):
    '''
    Get a BuildManager to use for I/O using the given extensions. If no extensions are provided,
    return a BuildManager that uses the core namespace
    '''
    type_map = call_docval_func(get_type_map, kwargs)
    return BuildManager(type_map)