Skip to content

refactor run_script so that it works with instrument script that uses on the fly components #112

Description

@yxqd

Currently run_script imports the component classes for an instrument, assuming each component in the instrument comes from a static component class. The limitation comes from the fact that it imports the component classes in the "compiled" instrument script. For example:

from mcvine.acc.components.sources.source_simple import Source_simple as comp0
from HSS_isotropic_sphere import HSS as comp1

propagate0 = comp0.propagate
propagate1 = comp1.propagate

If the component was created from a factory method, the component class may have been generated on the fly. Should improve the run_script to support these kind of components

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