sadickam commited on
Commit
82c9ec6
Β·
verified Β·
1 Parent(s): 604c2a8

Update sections.py

Browse files
Files changed (1) hide show
  1. sections.py +6 -59
sections.py CHANGED
@@ -243,33 +243,6 @@ def section_initial_data() -> None:
243
  st.dataframe(st.session_state.df_existing_mat, use_container_width=True)
244
 
245
  # ── Background noise ───────────────────────────────────────────────────
246
- # with t_bn:
247
-
248
- # st.write('''The primary objective here is to provide the initial input data needed to
249
- # start background noise analysis. See the 'Instructions' on the left for formatting information''')
250
-
251
- # c1, c2, c3 = st.columns([3, 2, 1])
252
- # st.session_state.bn_input_loc = c1.text_input(
253
- # "Location", st.session_state.bn_input_loc)
254
- # st.session_state.bn_input_val = c2.number_input(
255
- # "dBA", value=st.session_state.bn_input_val, min_value=0.0, step=0.1)
256
-
257
- # if c3.button("Add / Update"):
258
- # loc = st.session_state.bn_input_loc.strip()
259
- # if loc:
260
- # df = st.session_state.df_background_noise
261
- # if loc in df["Location"].values:
262
- # df.loc[df["Location"] == loc, "dBA"] = st.session_state.bn_input_val
263
- # else:
264
- # df.loc[len(df)] = [loc, st.session_state.bn_input_val]
265
- # st.session_state.df_background_noise = df
266
-
267
- # if st.session_state.df_background_noise.empty:
268
- # st.warning("⚠️ Enter at least one background-noise measurement.")
269
-
270
- # st.dataframe(st.session_state.df_background_noise, use_container_width=True)
271
-
272
-
273
  with t_bn:
274
 
275
  # ------------------------------------------------------------------
@@ -602,38 +575,7 @@ def section_final_checks() -> None:
602
  for f in FREQUENCIES
603
  }
604
 
605
- # ── RT60 final check ───────────────────────────────────────────────────
606
- # with t_rt:
607
- # if st.session_state.room_volume == 0 or not combined:
608
- # st.warning("⚠️ Provide volume + materials, then run Acoustic Treatment.")
609
- # else:
610
- # new_rt = {f: calc_abs_area(st.session_state.room_volume, a)
611
- # for f, a in combined.items()}
612
- # st.markdown("New RT60 values after acoustic treatment")
613
- # st.dataframe(pd.DataFrame([new_rt], index=["New RT60"]),
614
- # use_container_width=True)
615
-
616
- # y_cur = ([float(st.session_state.df_current_rt.iloc[0][f])
617
- # for f in FREQUENCIES]
618
- # if st.session_state.df_current_rt is not None else [None]*6)
619
-
620
- # fig = plot_rt_band(
621
- # y_cur,
622
- # [st.session_state.rt_min]*6,
623
- # [st.session_state.rt_max]*6,
624
- # "Final RT60 vs Standard Range",
625
- # )
626
- # fig.add_trace(go.Scatter(
627
- # x=FREQUENCIES,
628
- # y=[new_rt[f] for f in FREQUENCIES],
629
- # mode="lines+markers",
630
- # name="New",
631
- # marker_color="#d62728",
632
- # ))
633
- # st.plotly_chart(fig, use_container_width=True)
634
- # st.session_state.fig_rt_final = fig
635
-
636
- # ── RT60 final check ───────────────────────────────────────────────────
637
  # ── RT60 final check ───────────────────────────────────────────────────
638
  with t_rt:
639
  if st.session_state.room_volume == 0 or not st.session_state.new_absorption:
@@ -756,14 +698,19 @@ def section_faq() -> None:
756
  ### Frequently Asked Questions
757
  **Q1: What should I do if the data upload fails?**
758
  Ensure your file is in the correct format (CSV or Excel). Check that the column headings are consistent with the expected format (e.g., `125`, `250`, `500`, `1000`, `2000`, `4000` or `125Hz`, `250Hz`, `500Hz`, `1KHz`, `2KHz`, `4KHz`). Remove any extra rows or columns that do not contain relevant data.
 
759
  **Q2: How do I interpret the RT60 values?**
760
  RT60 values represent the time it takes for the sound to decay by 60 dB in a room. Lower RT60 values indicate faster sound decay and are preferable for environments where speech intelligibility is important. Higher RT60 values might be suitable for spaces intended for musical performances.
 
761
  **Q3: Why is my calculated RT60 not within the standard range?**
762
  This may occur if the room's current materials are not adequately absorbing sound. You may need to introduce new materials with higher absorption coefficients or increase the surface area of existing materials.
 
763
  **Q4: What should I do if the app does not accept my frequency columns?**
764
  The app standardizes frequency columns to numerical values (e.g., `125`, `250`) regardless of their initial format (e.g., `125Hz`, `125 Hz`). Ensure that the frequency values in your uploaded file are correctly formatted and consistent.
 
765
  **Q5: How can I improve speech intelligibility in my room?**
766
  To improve speech intelligibility, aim for a lower RT60 across the relevant frequencies, particularly in the range of 500 Hz to 4000 Hz. This can be achieved by adding more sound-absorbing materials, such as acoustic panels or curtains.
 
767
  **Q6: How can I save my analysis results?**
768
  You can download the PDF report, which includes all the data and graphs from your analysis. Click the "Download PDF Report" button at the end of your analysis to save the report to your device.
769
  ### Troubleshooting Tips
 
243
  st.dataframe(st.session_state.df_existing_mat, use_container_width=True)
244
 
245
  # ── Background noise ───────────────────────────────────────────────────
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  with t_bn:
247
 
248
  # ------------------------------------------------------------------
 
575
  for f in FREQUENCIES
576
  }
577
 
578
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  # ── RT60 final check ───────────────────────────────────────────────────
580
  with t_rt:
581
  if st.session_state.room_volume == 0 or not st.session_state.new_absorption:
 
698
  ### Frequently Asked Questions
699
  **Q1: What should I do if the data upload fails?**
700
  Ensure your file is in the correct format (CSV or Excel). Check that the column headings are consistent with the expected format (e.g., `125`, `250`, `500`, `1000`, `2000`, `4000` or `125Hz`, `250Hz`, `500Hz`, `1KHz`, `2KHz`, `4KHz`). Remove any extra rows or columns that do not contain relevant data.
701
+
702
  **Q2: How do I interpret the RT60 values?**
703
  RT60 values represent the time it takes for the sound to decay by 60 dB in a room. Lower RT60 values indicate faster sound decay and are preferable for environments where speech intelligibility is important. Higher RT60 values might be suitable for spaces intended for musical performances.
704
+
705
  **Q3: Why is my calculated RT60 not within the standard range?**
706
  This may occur if the room's current materials are not adequately absorbing sound. You may need to introduce new materials with higher absorption coefficients or increase the surface area of existing materials.
707
+
708
  **Q4: What should I do if the app does not accept my frequency columns?**
709
  The app standardizes frequency columns to numerical values (e.g., `125`, `250`) regardless of their initial format (e.g., `125Hz`, `125 Hz`). Ensure that the frequency values in your uploaded file are correctly formatted and consistent.
710
+
711
  **Q5: How can I improve speech intelligibility in my room?**
712
  To improve speech intelligibility, aim for a lower RT60 across the relevant frequencies, particularly in the range of 500 Hz to 4000 Hz. This can be achieved by adding more sound-absorbing materials, such as acoustic panels or curtains.
713
+
714
  **Q6: How can I save my analysis results?**
715
  You can download the PDF report, which includes all the data and graphs from your analysis. Click the "Download PDF Report" button at the end of your analysis to save the report to your device.
716
  ### Troubleshooting Tips