Skip to content

Let the users to give a selection of location labels to target #163

@filimarc

Description

@filimarc

For some cases it could be usefull to select a group of different locations instead of just one. For the example if for a devices i would like to target both soma and dendrites it is not possible at the moment.
For this reason i suggest to change the LabelTargetting from using an all to an any, for label check:

class LabelTargetting(LocationTargetting, classmap_entry="label"):
    labels = config.list(required=True)

    def get_locations(self, cell):
        locs = [
            loc
            for loc in cell.locations.values()
            if any(l_ in loc.section.labels for l_ in self.labels)
        ]
        return locs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions