thztools.reset_option#
- thztools.reset_option(key=None)[source]#
Reset one or more global options to default values.
- Parameters:
- keystr, optional
Option name. When
None, the default, resets all options.
- Returns:
- None
No return value.
Notes
Available options, with descriptions:
- sampling_timefloat | None
Global sampling time, normally in picoseconds. When set to
None, the default, times and frequencies are treated as dimensionless quantities that are scaled by the (undetermined) sampling time.
Examples
The global
sampling_timeoption is initialized toNoneat startup.>>> import thztools as thz >>> thz.get_option("sampling_time")
Use the
set_optionfunction to change the value from the default.>>> thz.set_option("sampling_time", 0.05) >>> thz.get_option("sampling_time") 0.05
Reset all options to default values.
>>> thz.reset_option() >>> thz.get_option("sampling_time")