diff --git a/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py b/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py index 16a50dde8e9d4fb73bf4ccaabb919bf34dce9e60..cdc98748b1a1c5af2fdb8774aeb0a97c72784568 100644 --- a/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py +++ b/CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py @@ -128,8 +128,9 @@ class HolographyDataset(): for hbs, ho in list_of_hbs_ms_tuples: if station_name in hbs.target_station_names: frequency = ho.frequency - + frequency_string = str(frequency) for beamlet in self.beamlets: + beamlet_string = str(beamlet) reference_station_names, cross_correlation =\ ho.ms_for_a_given_beamlet_number[beamlet].\ read_cross_correlation_time_flags_per_station_names(station_name, @@ -141,10 +142,10 @@ class HolographyDataset(): if reference_station not in self.data: self.data[reference_station] = dict() - if frequency not in self.data[reference_station]: - self.data[reference_station][frequency] = dict() + if frequency_string not in self.data[reference_station]: + self.data[reference_station][frequency_string] = dict() - self.data[reference_station][frequency][beamlet] = \ + self.data[reference_station][frequency_string][beamlet_string] = \ cross_correlation[reference_station_index, :] @@ -230,11 +231,14 @@ class HolographyDataset(): self.ra_dec = dict() for frequency in self.frequencies: + frequency_string = str(frequency) if frequency not in self.ra_dec: - self.ra_dec[frequency] = dict() + self.ra_dec[frequency_string] = dict() for beamlet in self.beamlets: - self.ra_dec[frequency][beamlet] = \ - virtual_pointing[(frequency, beamlet)] + beamlet_string = str(beamlet) + self.ra_dec[frequency_string][beamlet_string] = numpy.array( \ + virtual_pointing[(frequency, beamlet)], + dtype=coordinate_type) # reads the target station position and the coordinate of its axes @@ -324,6 +328,7 @@ class HolographyDataset(): result.antenna_field_position = f.attrs[HDS_ANTENNA_FIELD_POSITION].tolist() result.reference_stations = list(f[HDS_REFERENCE_STATION]) result.frequencies = list(f[HDS_FREQUENCY]) + result.ra_dec = dict() result.data = dict() result.beamlets = [i for i in range(f[HDS_DATA].shape[2])]