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_time option is initialized to None at startup.

>>> import thztools as thz
>>> thz.get_option("sampling_time")

Use the set_option function to set the global sampling time to the preferred value.

>>> thz.set_option("sampling_time", 0.05)
>>> thz.get_option("sampling_time")
0.05