thztools.set_option#
- thztools.set_option(key, value)[source]#
Set global option.
- Parameters:
- keystr
Option name.
- valueobject
Option value.
- 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 set the global sampling time to the preferred value.>>> thz.set_option("sampling_time", 0.05) >>> thz.get_option("sampling_time") 0.05