labscript.labscript.set_passed_properties

set_passed_properties(property_names={})[source]

Decorator for device __init__ methods that saves the listed arguments/keyword arguments as properties.

Argument values as passed to __init__ will be saved, with the exception that if an instance attribute exists after __init__ has run that has the same name as an argument, the instance attribute will be saved instead of the argument value. This allows code within __init__ to process default arguments before they are saved.

Internally, all properties are accessed by calling self.get_property().

Parameters

property_names (dict) – is a dictionary {key:val}, where each val is a list [var1, var2, …] of variables to be pulled from properties_dict and added to the property with name key (its location)