attune.tune_test
- attune.tune_test(*, data, channel, arrangement, instrument, level=False, gtol=0.01, ltol=0.1, restore_setpoints=True, autosave=True, save_directory=None, **spline_kwargs) Instrument [source]
Workup a Tune Test.
- Parameters
data (wt.data.Data) – should be in (setpoint, dependent)
channel (wt.data.Channel or int or str) – channel to process
arrangement (str) – name of the arrangment to modify
instrument (attune.Instrument) – instrument object to modify
level (bool, optional) – toggle leveling data (Defalts to False)
gtol (float, optional) – global tolerance for rejecting noise level relative to global maximum
ltol (float, optional) – local tolerance for rejecting data relative to slice maximum
restore_setpoints (bool, optional) – toggles remapping onto original setpoints for each tune (default is True)
autosave (bool, optional) – toggles saving of instrument file and images (Defaults to True)
save_directory (Path-like) – where to save (Defaults to current working directory)
**spline_kwargs (optional) – extra arguments to pass to spline creation (e.g. s=0, k=1 for linear interpolation)
- Returns
New instrument object.
- Return type
Example
``` >>> d = wt.open(path_to_data_file) >>> d.transform(“w3_points”, “wm-w3”) >>> instr2 = attune.tune_test(
data=d, channel=”sample”, arrangement=”df1”, instrument=instr, gtol=.0002, ltol=.01, autosave=False, save_directory=folder
)