Commit 91c3a88f authored by mancini's avatar mancini

SSB-47: Refactor

parent 9fa41534
......@@ -92,7 +92,7 @@ def normalize_step(dataset, input_datatable):
"""
output_datatable = normalize_beams_by_central_one(dataset,
input_datatable,
dataset.central_beamlets)
dataset.central_beamlets())
dataset.derived_data['NORMALIZED'] = output_datatable
return output_datatable
......@@ -137,7 +137,7 @@ def station_averaging_step(dataset, input_datatable):
@log_step_execution('solving gains', logger)
@save_in_case_of_exception()
def compute_gains_step(dataset, input_datatable, direct_complex=True):
def compute_gains_step(dataset, input_datatable):
"""
Derive the gains for every antenna in the station given the input crosscorrelations
......@@ -148,7 +148,7 @@ def compute_gains_step(dataset, input_datatable, direct_complex=True):
:return: The gains computed for each antenna
:rtype: dict(dict(dict(numpy.ndarray)))
"""
output_datable = solve_gains_per_datatable(dataset, input_datatable, direct_complex=direct_complex)
output_datable = solve_gains_per_datatable(dataset, input_datatable)
if dataset.derived_data is None:
dataset.derived_data = dict()
dataset.derived_data['GAINS'] = output_datable
......
......@@ -469,10 +469,10 @@ def weighted_average_dataset_per_station(dataset, input_data_table):
:type input_data_table: dict(dict(numpy.ndarray))
:return:
"""
stations = dataset.reference_stations
stations = dataset.reference_stations()
first_station = stations[0]
frequencies = dataset.frequencies
frequencies = dataset.frequencies()
result_ALL = dict()
result = dict(all=result_ALL)
......
......@@ -352,7 +352,7 @@ def plot_station_averaged_visibilities_lm_plane(dset: HolographyDataset,
__apply_to_datatable(dset,
derived_datatable_name,
_plot_station_averaged_visibilities_lm_plane_datatable,
dset.central_beamlets, save_to=save_to)
dset.central_beamlets(), save_to=save_to)
def plot_gains_per_antenna(dset: HolographyDataset, derived_datatable_name='GAINS', save_to=None):
......
......@@ -25,12 +25,12 @@ def normalize_beams_by_central_one(dataset, input_data, central_beamlet_number):
:return:
"""
normalized_data = dict()
for station in dataset.reference_stations:
for station in dataset.reference_stations():
normalized_data_per_station = dict()
normalized_data[station] = normalized_data_per_station
data_per_station = input_data[station]
for frequency in dataset.frequencies:
for frequency in dataset.frequencies():
frequency_str = str(frequency)
data_per_station_per_frequency = data_per_station[frequency_str]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment