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