26 lines
425 B
Python
26 lines
425 B
Python
import json
|
|
import subprocess
|
|
|
|
import numpy as np
|
|
|
|
from charon_vna.gui import DEFAULT_CONFIG
|
|
|
|
config = dict(
|
|
frequency=np.linspace(1e9, 2e9, 11).tolist(),
|
|
power=-5,
|
|
)
|
|
|
|
with open(DEFAULT_CONFIG, "w") as f:
|
|
json.dump(config, f)
|
|
|
|
# autoformat
|
|
subprocess.run(
|
|
[
|
|
"python",
|
|
"-m",
|
|
"json.tool",
|
|
DEFAULT_CONFIG.resolve().as_posix(),
|
|
DEFAULT_CONFIG.resolve().as_posix(),
|
|
]
|
|
)
|