mcstasscript.instrument_diagnostics.diagnostics_instrument.DiagnosticsInstrument
mcstasscript.instrument_diagnostics.diagnostics_instrument.DiagnosticsInstrument¶
- class mcstasscript.instrument_diagnostics.diagnostics_instrument.DiagnosticsInstrument(instr)¶
- __init__(instr)¶
Diagnostics instrument object with related capabilities
The diagnostics instrument takes a copy of an instrument object and can modify this version in ways relevant for diagnostics of the instrument. It can remove use of PREVIOUS and correct the use of target_index to make it safe to add additional components without altering the instrument. It carries it’s own settings and parameters that wont impact the original instrument. The diagnostics instrument can be reset to the original state, and will have settings and parameters applied again.
Parameters:
- instrMcCode_instr object
Instrument which needs a diagnostics copy
Methods
__init__
(instr)Diagnostics instrument object with related capabilities
Corrects target_index based on original instrument
Replaces use of PREVIOUS with direct references
Resets instrument to original state, with new pars and settings
set_parameters
(**kwargs)Set parameters as in instrument object
settings
(**kwargs)Apply settings as in an instrument object
Show parameters as on instrument object
Show settings of diagnostics instrument
- correct_target_index()¶
Corrects target_index based on original instrument
- remove_previous_use()¶
Replaces use of PREVIOUS with direct references
- reset_instr()¶
Resets instrument to original state, with new pars and settings
- set_parameters(**kwargs)¶
Set parameters as in instrument object
- settings(**kwargs)¶
Apply settings as in an instrument object
- show_parameters()¶
Show parameters as on instrument object
- show_settings()¶
Show settings of diagnostics instrument