Skip to content

Replace src.filters array with something more explicit #207

@janden

Description

@janden

Right now, we have an array src.filters that lists all the CTF filters for the images in an ImageSource. In reality, there are only a small number of filters in a dataset, so there's a natural mapping from the set of images to the (much smaller) set of images. Right now, we deal with this by constructing the array so that it contains many references to a small set of filters, but this causes problems, notably here:

f.__class__ = MultiplicativeFilter

and here:
unique_filters = list(set(src.filters))

A better approach might be to keep two separate variables: filters and filters_idx, the latter of which contains the indices corresponding to the list of unique filters in filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions