IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 99ec1189 authored by Nikos Karastathis's avatar Nikos Karastathis :ocean:
Browse files

add getters for antennas and units in the output

parent 577f47cd
No related branches found
No related tags found
No related merge requests found
Pipeline #11668 failed
This commit is part of merge request !560. Comments created here will be created in the context of that merge request.
...@@ -127,6 +127,40 @@ class RadioProcess(Output): ...@@ -127,6 +127,40 @@ class RadioProcess(Output):
) )
) )
def get_antenna_list(self):
"""
Return a list with the names of the antennas of this RadioProcess.
"""
antennas = list(self.config["antennas"].keys())
return antennas
def get_antennas(self):
"""
Return a pandas dataframe with all the information for the antennas
of this RadioProcess.
"""
antennas = list(self.config["antennas"].keys())
dictionary = {}
# loop over each of the antennas
for name in antennas:
type = self.config["antennas"][name]["type"]
start_time = self.config["antennas"][name]["start time"]
duration = self.config["antennas"][name]["duration"]
nr_bins = self.config["antennas"][name]["number of bins"]
sampling_frequency = self.config["antennas"][name]["sampling frequency"]
location = self.config["antennas"][name]["location"]
dictionary[name] = pd.DataFrame({'type': type, 'start time': start_time, 'duration': duration,
'number of bins': nr_bins, 'sampling frequency': sampling_frequency,
'x': [location[0]], 'y': [location[1]], 'z': [location[2]]})
return dictionary
def get_units(self):
"""
Return the units of the antennas of this RadioProcess.
"""
return self.config["units"]
def __repr__(self) -> str: def __repr__(self) -> str:
""" """
Return a string representation of this class. Return a string representation of this class.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment