Skip to content

Default values for instrument specific attributes #193

@dieris

Description

@dieris

How to deal with attributes that are meaningful only for a specific instrument, but not for the whole class?

For example, I would like to set a default value for the reference of a Holzworth (since None is not a valid choice):

def new_source(self, label, model, address, power=-30.0, frequency=5.0e9, reference=None):

https://github.com/BBN-Q/Auspex/blob/04b8f2042ad1aefb80f5eed69c1197fc3d029a36/src/auspex/instruments/holzworth.py#L217

For a different source (Labbrick, Agilent, etc.), the reference attribute is currently not set. So one may end up with a database having non-null entries that have no real meaning, such a Labbrick with a reference attribute. Ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions