Skip to content

Commit a1c7070

Browse files
authored
Merge pull request #7 from Wireless-Information-Networking/hotfix/plotting-issues
Hotfix/plotting issues
2 parents e5f40ad + 99697a1 commit a1c7070

File tree

2 files changed

+591
-497
lines changed

2 files changed

+591
-497
lines changed

main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
import glob # Unix style pathname pattern expansion for file searching. #
1313
import re # Regular expression operations for pattern matching in filenames. #
1414
import numpy as np # Mathematical functions. #
15+
import pandas as pd # Data manipulation and analysis library. #
1516
import scipy.constants as sc # Physical and mathematical constants. #
1617
import matplotlib.pyplot as plt # Data visualization. #
1718
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. #
1920
import src.beamforming as bf # Beamforming methods for AoA estimation. #
2021
import src.music as music # MUSIC algorithm for high-resolution AoA estimation. #
2122
import src.bayesian_regression as br # Bayesian regression for machine learning models on AoA data. #
@@ -27,7 +28,8 @@
2728
# =================================================================================================================================== #
2829
# ------------------------------------------------------- CONFIGURATION SETTINGS ---------------------------------------------------- #
2930
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. #
3133
DATA_DIRECTORY = os.path.join(PROJECT_ROOT, 'data', '2025-07-09') # Directory containing the data files. #
3234
RESULTS_BASE_DIR = os.path.join(PROJECT_ROOT, 'results') # Store results in a separate folder. #
3335
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
6870
- dict: Dictionary with AoA estimates and spectra for all methods
6971
"""
7072
# 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)
7375
# 2. Beamforming methods
7476
B_ds, B_w, theta_ds, theta_w = bf.beamforming_spectrum_calculation(
7577
phasor1, phasor2, rssi1, rssi2, L, wavelength, aoa_scan)

0 commit comments

Comments
 (0)