This documentation is not for the latest stable Salvus version.
import pathlib
from frequency_band import FrequencyBand
MIN_PERIOD = 70.0
MAX_PERIOD = 120.0
fband = FrequencyBand(
min_frequency_in_hertz=1.0 / MAX_PERIOD,
max_frequency_in_hertz=1.0 / MIN_PERIOD,
)
fband_file = pathlib.Path("./frequency_band_70_120.pkl")
# Save it, so it can be re-opened in the following notebooks, or check against
# file on disk.
if not fband_file.exists():
fband.save(fband_file)
else:
fband_on_disk = FrequencyBand.load(fband_file)
assert fband == fband_on_disk, (
"The frequency band file on disk is different from the newly created "
"frequency band, please remove the file on disk with the "
"understanding that this invalidates the results in all subsequent "
"notebooks in this tutorial."
)
fband
FrequencyBand(min_frequency_in_hertz=0.008333333333333333, max_frequency_in_hertz=0.014285714285714285)