|
"""Global constants and initial session-state defaults."""
|
|
from typing import List
|
|
import pandas as pd
|
|
|
|
FREQUENCIES: List[int] = [125, 250, 500, 1000, 2000, 4000]
|
|
TOTAL_DOTS = 200
|
|
AI_BANDS = {
|
|
(0.00, 0.24): "None",
|
|
(0.25, 0.40): "Fair",
|
|
(0.41, 0.60): "Good",
|
|
(0.61, 1.00): "Excellent",
|
|
}
|
|
MAJOR_TABS = [
|
|
"Instructions",
|
|
"Initial Data Entry",
|
|
"Initial Compliance Checks",
|
|
"Acoustic Treatment",
|
|
"Final Compliance Checks",
|
|
"FAQ / Help",
|
|
]
|
|
|
|
|
|
DEFAULTS = dict(
|
|
major_tab=MAJOR_TABS[0],
|
|
|
|
df_current_rt=None, df_existing_mat=None, room_volume=0.0,
|
|
df_background_noise=pd.DataFrame(columns=["Location", "dBA"]),
|
|
bn_input_loc="", bn_input_val=0.0,
|
|
df_spl=None,
|
|
|
|
rt_min=0.0, rt_max=0.0, bn_min=0.0, bn_max=0.0,
|
|
|
|
dots_init_dict={}, ai_init_dict={},
|
|
dots_final_dict={}, ai_final_dict={},
|
|
|
|
desired_rt_df=pd.DataFrame(
|
|
{"Frequency": FREQUENCIES, "Desired RT60": [0.01]*6}
|
|
),
|
|
df_new_mat=None,
|
|
|
|
current_absorption={}, new_absorption={},
|
|
fig_rt_initial=None, fig_bn_initial=None,
|
|
fig_rt_final=None, fig_bn_final=None,
|
|
)
|
|
|