Skip to content

Improve the integration of UVEC and custom UVEC #267

Description

@brunozc

Improve the post_init for the UvecLoad in load.py:

` def post_init(self):
"""
Check if the UVEC model is supported in STEM.
"""

    if self.uvec_model is not None:
        if self.uvec_model.__name__ not in (model.value for model in UvecSupportedModels):
            raise ValueError(f"UVEC model {self.uvec_model} is not supported. Please use one of the following models: \
                    {[model.value for model in UvecSupportedModels]}")
        self.uvec_file = "/".join([self.uvec_model.__name__.split(".")[-1], "uvec.py"])
        self.uvec_function_name = "uvec"`

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