diff --git a/python/corsika/io/outputs/radio_process.py b/python/corsika/io/outputs/radio_process.py index 9edc6baae45abbf4814f2f09b8591b7d63977409..eb950b962e91e11a0131ee78b3ec34b85f13d508 100644 --- a/python/corsika/io/outputs/radio_process.py +++ b/python/corsika/io/outputs/radio_process.py @@ -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: """ Return a string representation of this class.