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?
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
referenceof a Holzworth (sinceNoneis not a valid choice):QGL/QGL/ChannelLibraries.py
Line 385 in 0dae294
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?