118 lines
3.2 KiB
Python
Executable file
118 lines
3.2 KiB
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
from backscattering_analyzer.display import show_projection
|
|
from backscattering_analyzer.experiment import AcquisitionType, Experiment
|
|
|
|
from gettext import install
|
|
from rich.progress import track
|
|
|
|
from numpy import exp, loadtxt
|
|
from matplotlib.pyplot import (
|
|
loglog,
|
|
show,
|
|
legend,
|
|
close,
|
|
title,
|
|
xlabel,
|
|
ylabel,
|
|
xlim,
|
|
ylim,
|
|
grid,
|
|
tick_params,
|
|
)
|
|
|
|
install(__name__)
|
|
|
|
date = "2024_08_15"
|
|
|
|
design_o5_sensitivity = loadtxt(
|
|
"/home/demagny/data/sensitivity/O5/23932_O5DesignASD.txt"
|
|
)
|
|
plan_o5_sensitivity = loadtxt("/home/demagny/data/sensitivity/O5/23932_O5PlanBASD.txt")
|
|
high_o5_sensitivity = loadtxt(
|
|
"/home/demagny/data/sensitivity/O5/23932_O5HighSensASD.txt"
|
|
)
|
|
low_o5_sensitivity = loadtxt("/home/demagny/data/sensitivity/O5/23932_O5LowSensASD.txt")
|
|
h1_o5_sensitivity = loadtxt("/home/demagny/data/sensitivity/O5/23932_O5HighSensASD.txt")
|
|
h1_o5_sensitivity[:, 1] = h1_o5_sensitivity[:, 1] / 10
|
|
current_good = loadtxt("/home/demagny/data/sensitivity/O4/nominal_reference.txt")
|
|
current_bad = loadtxt("/home/demagny/data/sensitivity/O4/bad_weather_reference.txt")
|
|
|
|
# fscs = [2e-15, 7e-14, 3e-14]
|
|
# SDB1 = 2e-14
|
|
fscs = [5e-16, 7e-15, 5e-15]
|
|
fsc_SDB1 = 5e-15
|
|
benches = ["SDB2", "SNEB", "SWEB"]
|
|
|
|
experiment = Experiment("SDB1", date, "values-coupling.toml")
|
|
|
|
experiment.factors = {"pre": fsc_SDB1 / 1e-6, "true": fsc_SDB1}
|
|
|
|
experiment.projection_reference = experiment.compute_projection(
|
|
AcquisitionType.REFERENCE
|
|
)
|
|
|
|
sum = [experiment.projection_reference.x, experiment.projection_reference.y]
|
|
|
|
loglog(
|
|
experiment.projection_reference.x,
|
|
experiment.projection_reference.y,
|
|
label=_("{} projection ($f_{{sc}} = {}$)".format("SDB1", fsc_SDB1)),
|
|
)
|
|
|
|
for index in track(range(len(benches)), description=_("Computing projection...")):
|
|
bench = benches[index]
|
|
fsc = fscs[index]
|
|
|
|
experiment = Experiment(bench, date, "values-coupling.toml")
|
|
|
|
experiment.factors = {"pre": fsc / 1e-6, "true": fsc}
|
|
|
|
experiment.projection_reference = experiment.compute_projection(
|
|
AcquisitionType.REFERENCE
|
|
)
|
|
|
|
sum[1] += experiment.projection_reference.y
|
|
|
|
loglog(
|
|
experiment.projection_reference.x,
|
|
experiment.projection_reference.y,
|
|
label=_("{} projection ($f_{{sc}} = {}$)".format(bench, fsc)),
|
|
)
|
|
loglog(sum[0], sum[1], label="sum of all projections")
|
|
loglog(
|
|
current_good[0],
|
|
current_good[1],
|
|
label="current sensitivity in good condition",
|
|
)
|
|
loglog(
|
|
current_bad[0],
|
|
current_bad[1],
|
|
label="current sensitivity in bad condition",
|
|
)
|
|
loglog(
|
|
high_o5_sensitivity[:, 0],
|
|
high_o5_sensitivity[:, 1],
|
|
label="high sensitivity projection for O5 (BNS range: 160 Mpc)",
|
|
)
|
|
loglog(
|
|
h1_o5_sensitivity[:, 0],
|
|
h1_o5_sensitivity[:, 1],
|
|
label="order 10 below high O5 projection",
|
|
)
|
|
loglog(
|
|
low_o5_sensitivity[:, 0],
|
|
low_o5_sensitivity[:, 1],
|
|
label="low sensitivity projection for O5 (BNS range: 106 Mpc)",
|
|
)
|
|
legend()
|
|
title(_("Projection when bad weather (august, 2024), computed using O5 TF"))
|
|
xlabel(_("frequencies (Hz)"))
|
|
ylabel(_("sensibility ($\\frac{1} {\\sqrt {Hz}}$)"))
|
|
xlim(5, 100)
|
|
ylim(10e-28, 10e-18)
|
|
tick_params(axis="both", which="both")
|
|
grid(True, which="both", axis="both")
|
|
|
|
show()
|
|
close()
|