|
12 | 12 | import glob # Unix style pathname pattern expansion for file searching. # |
13 | 13 | import re # Regular expression operations for pattern matching in filenames. # |
14 | 14 | import numpy as np # Mathematical functions. # |
| 15 | +import pandas as pd # Data manipulation and analysis library. # |
15 | 16 | import scipy.constants as sc # Physical and mathematical constants. # |
16 | 17 | import matplotlib.pyplot as plt # Data visualization. # |
17 | 18 | import src.data_management as dm # Data management functions for importing and organizing data. # |
18 | | -import src.phase_difference as pd # Phase difference calculations for AoA estimation. # |
| 19 | +import src.phase_difference as pad # Phase difference calculations for AoA estimation. # |
19 | 20 | import src.beamforming as bf # Beamforming methods for AoA estimation. # |
20 | 21 | import src.music as music # MUSIC algorithm for high-resolution AoA estimation. # |
21 | 22 | import src.bayesian_regression as br # Bayesian regression for machine learning models on AoA data. # |
|
27 | 28 | # =================================================================================================================================== # |
28 | 29 | # ------------------------------------------------------- CONFIGURATION SETTINGS ---------------------------------------------------- # |
29 | 30 | SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) # Get the directory of the current script. # |
30 | | -PROJECT_ROOT = os.path.dirname(SCRIPT_DIR) # Go up one level to project root. # |
| 31 | +# PROJECT_ROOT = os.path.dirname(SCRIPT_DIR) # Go up one level to project root. # |
| 32 | +PROJECT_ROOT = SCRIPT_DIR # Use the script directory as the project root. # |
31 | 33 | DATA_DIRECTORY = os.path.join(PROJECT_ROOT, 'data', '2025-07-09') # Directory containing the data files. # |
32 | 34 | RESULTS_BASE_DIR = os.path.join(PROJECT_ROOT, 'results') # Store results in a separate folder. # |
33 | 35 | EXPERIMENT_NAME = 'AoA_Analysis' # Name of the experiment for output directory. # |
@@ -68,8 +70,8 @@ def analyze_aoa(phasor1, phasor2, rssi1, rssi2, L, wavelength, aoa_scan, true_an |
68 | 70 | - dict: Dictionary with AoA estimates and spectra for all methods |
69 | 71 | """ |
70 | 72 | # 1. Phase difference method |
71 | | - dphi = dm.compute_phase_difference(phasor1, phasor2) |
72 | | - theta_ph = dm.phase_difference_aoa(dphi, L, wavelength) |
| 73 | + dphi = pad.compute_phase_difference(phasor1, phasor2) |
| 74 | + theta_ph = pad.phase_difference_aoa(dphi, L, wavelength) |
73 | 75 | # 2. Beamforming methods |
74 | 76 | B_ds, B_w, theta_ds, theta_w = bf.beamforming_spectrum_calculation( |
75 | 77 | phasor1, phasor2, rssi1, rssi2, L, wavelength, aoa_scan) |
|
0 commit comments