Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
6b0200af
Commit
6b0200af
authored
5 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
SSB-47
: Add accessors to readonly fields
parent
dddee213
No related branches found
No related tags found
1 merge request
!44
Merge back holography to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py
+174
-109
174 additions, 109 deletions
...alibrationCommon/lib/datacontainers/holography_dataset.py
with
174 additions
and
109 deletions
CAL/CalibrationCommon/lib/datacontainers/holography_dataset.py
+
174
−
109
View file @
6b0200af
...
...
@@ -8,6 +8,7 @@ from .holography_dataset_definitions import *
from
.holography_observation
import
HolographyObservation
from
.holography_specification
import
HolographySpecification
from
numpy
import
isnan
logger
=
logging
.
getLogger
(
__file__
)
...
...
@@ -37,6 +38,7 @@ def compare_nested_collections(dict1, dict2):
return
False
return
result
def
bytestring_list_to_string
(
list
):
return
[
item
.
decode
(
'
utf-8
'
)
for
item
in
list
]
...
...
@@ -63,54 +65,54 @@ class HolographyDataset():
initialised with an assignment to their respective constructors.
'''
# float, HDS version
self
.
version
=
HOLOGRAPHY_DATA_SET_VERSION
self
.
_
version
=
HOLOGRAPHY_DATA_SET_VERSION
# list of ints
self
.
rcu_list
=
list
()
self
.
_
rcu_list
=
list
()
# integer
self
.
mode
=
None
self
.
_
mode
=
None
# list of strings
self
.
sas_ids
=
list
()
self
.
_
sas_ids
=
list
()
# string
self
.
target_station_name
=
None
self
.
_
target_station_name
=
None
# list of 3 floats
self
.
target_station_position
=
None
self
.
_
target_station_position
=
None
# name of the source (str)
self
.
source_name
=
None
self
.
_
source_name
=
None
# position of the source array[ (RA, numpy.float64), (DEC, numpy.float64), (EPOCH, 'S10')]
self
.
source_position
=
None
self
.
_
source_position
=
None
# date time when the observation started in MJD in seconds (float)
self
.
start_time
=
None
self
.
_
start_time
=
None
# date time when the observation started in MJD in seconds (float)
self
.
end_time
=
None
self
.
_
end_time
=
None
# array(3,3), translation matrix for
# (RA, DEC) <-> (l, m) conversion
self
.
rotation_matrix
=
None
self
.
_
rotation_matrix
=
None
# list of beamlet numbers
self
.
beamlets
=
list
()
self
.
_
beamlets
=
list
()
# The central beam or beamlet for each frequency
self
.
central_beamlets
=
dict
()
self
.
calibration_tables
=
dict
()
self
.
_
central_beamlets
=
dict
()
self
.
_
calibration_tables
=
dict
()
self
.
derived_calibration_tables
=
dict
()
# coordinates of the antenna position in the target
self
.
antenna_field_position
=
list
()
self
.
_
antenna_field_position
=
list
()
# list of reference station names
self
.
reference_stations
=
list
()
self
.
_
reference_stations
=
list
()
# list of _frequencies
self
.
frequencies
=
list
()
self
.
_
frequencies
=
list
()
# dict(frequency:
# array that contains the ra_dec of which a beam
# points at given a frequency and a beamlet number
# numpy.dtype([('RA', numpy.float64),
# ('DEC',numpy.float64),
# ('EPOCH', 'S10')])
self
.
ra_dec
=
dict
()
self
.
_
ra_dec
=
dict
()
# dict(reference_station_name:
# dict(frequency:
# dict(beamlet_number:
...
...
@@ -131,6 +133,70 @@ class HolographyDataset():
# numpy.array()
self
.
derived_data
=
None
@property
def
version
(
self
):
return
self
.
_version
@property
def
rcu_list
(
self
):
return
self
.
_rcu_list
@property
def
mode
(
self
):
return
self
.
_mode
@property
def
sas_ids
(
self
):
return
self
.
_sas_ids
@property
def
target_station_name
(
self
):
return
self
.
_target_station_name
@property
def
target_station_position
(
self
):
return
self
.
_target_station_position
@property
def
source_name
(
self
):
return
self
.
_source_name
@property
def
source_position
(
self
):
return
self
.
source_position
@property
def
start_time
(
self
):
return
self
.
_start_time
@property
def
end_time
(
self
):
return
self
.
_end_time
def
rotation_matrix
(
self
):
return
self
.
_rotation_matrix
def
beamlets
(
self
):
return
self
.
_beamlets
def
central_beamlets
(
self
):
return
self
.
_central_beamlets
def
calibration_tables
(
self
):
return
self
.
_calibration_tables
def
antenna_field_position
(
self
):
return
self
.
_antenna_field_position
def
reference_stations
(
self
):
return
self
.
_reference_stations
def
frequencies
(
self
):
return
self
.
_frequencies
def
ra_dec
(
self
):
return
self
.
_ra_dec
def
__eq__
(
self
,
hds
=
None
):
'''
This comparison operator compares the values of the relevant members of
...
...
@@ -173,7 +239,6 @@ class HolographyDataset():
return
False
return
equality
def
find_central_beamlets
(
self
,
source
,
ra_dec
,
frequencies
,
beamlets
):
'''
This function finds the central beamlet of a target station for every
...
...
@@ -233,8 +298,8 @@ class HolographyDataset():
logger
.
debug
(
'
reading data
'
)
self
.
__read_data
(
station_name
,
list_of_hbs_ms_tuples
)
logger
.
debug
(
'
read data
'
)
self
.
central_beamlets
=
self
.
find_central_beamlets
(
self
.
source_position
,
self
.
ra_dec
,
self
.
frequencies
,
self
.
beamlets
)
self
.
_
central_beamlets
=
self
.
find_central_beamlets
(
self
.
_
source_position
,
self
.
_
ra_dec
,
self
.
_
frequencies
,
self
.
_
beamlets
)
logger
.
info
(
"
Creation of a holography data set for station
\"
%s
\"
done.
"
,
station_name
)
except
Exception
as
e
:
logger
.
exception
(
"
Error creating dataset for station
\"
%s
\"
: %s
"
,
station_name
,
e
)
...
...
@@ -298,9 +363,9 @@ class HolographyDataset():
if
station_name
in
hbs
.
target_station_names
:
frequency
=
ho
.
frequency
frequency_string
=
str
(
frequency
)
for
beamlet
in
self
.
beamlets
:
for
beamlet
in
self
.
_
beamlets
:
beamlet_string
=
str
(
beamlet
)
if
beamlet_string
not
in
self
.
ra_dec
[
frequency_string
]:
if
beamlet_string
not
in
self
.
_
ra_dec
[
frequency_string
]:
logger
.
error
(
'
missing pointing %s at frequency %s for station %s skipping
'
,
beamlet_string
,
frequency_string
,
...
...
@@ -310,9 +375,9 @@ class HolographyDataset():
ho
.
ms_for_a_given_beamlet_number
[
beamlet
].
read_cross_correlation_time_flags_lm_per_station_name
(
station_name
,
self
.
reference_stations
,
self
.
ra_dec
[
frequency_string
][
beamlet_string
],
self
.
rotation_matrix
)
self
.
_
reference_stations
,
self
.
_
ra_dec
[
frequency_string
][
beamlet_string
],
self
.
_
rotation_matrix
)
for
reference_station_index
,
reference_station
in
\
enumerate
(
reference_station_names
):
...
...
@@ -378,7 +443,7 @@ class HolographyDataset():
sas_ids
.
add
(
ho
.
sas_id
)
self
.
target_station_name
=
station_name
self
.
_
target_station_name
=
station_name
reference_stations
.
update
(
hbs
.
reference_station_names
)
try
:
single_beamlet
=
int
(
beam_specification
.
beamlets
)
...
...
@@ -394,20 +459,20 @@ class HolographyDataset():
beam_specification
.
virtual_pointing
[
'
coordinate_system
'
])
else
:
continue
self
.
frequencies
=
sorted
(
frequencies
)
self
.
beamlets
=
sorted
(
beamlets
)
self
.
start_time
=
start_mjd
self
.
end_time
=
end_mjd
self
.
sas_ids
=
list
(
sas_ids
)
self
.
reference_stations
=
list
(
reference_stations
)
self
.
rcu_list
=
list
(
rcu_list
)
self
.
ra_dec
=
dict
()
for
frequency
in
self
.
frequencies
:
self
.
_
frequencies
=
sorted
(
frequencies
)
self
.
_
beamlets
=
sorted
(
beamlets
)
self
.
_
start_time
=
start_mjd
self
.
_
end_time
=
end_mjd
self
.
_
sas_ids
=
list
(
sas_ids
)
self
.
_
reference_stations
=
list
(
reference_stations
)
self
.
_
rcu_list
=
list
(
rcu_list
)
self
.
_
ra_dec
=
dict
()
for
frequency
in
self
.
_
frequencies
:
frequency_string
=
str
(
frequency
)
if
frequency
not
in
self
.
ra_dec
:
self
.
ra_dec
[
frequency_string
]
=
dict
()
for
beamlet
in
self
.
beamlets
:
if
frequency
not
in
self
.
_
ra_dec
:
self
.
_
ra_dec
[
frequency_string
]
=
dict
()
for
beamlet
in
self
.
_
beamlets
:
beamlet_string
=
str
(
beamlet
)
ra
,
dec
,
_
=
virtual_pointing
[(
frequency
,
beamlet
)]
if
isnan
(
ra
)
or
isnan
(
dec
):
...
...
@@ -416,7 +481,7 @@ class HolographyDataset():
# skip if the pointing is ill specified
continue
self
.
ra_dec
[
frequency_string
][
beamlet_string
]
=
numpy
.
array
(
self
.
_
ra_dec
[
frequency_string
][
beamlet_string
]
=
numpy
.
array
(
virtual_pointing
[(
frequency
,
beamlet
)],
dtype
=
HDS_coordinate_type
)
...
...
@@ -429,11 +494,11 @@ class HolographyDataset():
station_name
)
logger
.
debug
(
'
selecting used antenna ids %s
'
,
used_antennas
)
self
.
antenna_field_position
=
[
list
(
station_position
-
antenna_offset
)
for
antenna_id
,
antenna_offset
in
enumerate
(
tile_offset
)
if
antenna_id
in
used_antennas
]
self
.
target_station_position
=
list
(
station_position
)
self
.
rotation_matrix
=
axes_coordinates
self
.
_
antenna_field_position
=
[
list
(
station_position
-
antenna_offset
)
for
antenna_id
,
antenna_offset
in
enumerate
(
tile_offset
)
if
antenna_id
in
used_antennas
]
self
.
_
target_station_position
=
list
(
station_position
)
self
.
_
rotation_matrix
=
axes_coordinates
if
station_name
not
in
target_stations
:
logger
.
error
(
'
Station %s was not involved in the observation.
'
...
...
@@ -443,18 +508,18 @@ class HolographyDataset():
%
station_name
,
)
if
len
(
mode
)
==
1
:
self
.
mode
=
mode
.
pop
()
self
.
_
mode
=
mode
.
pop
()
else
:
raise
ValueError
(
'
Multiple RCUs mode are not supported
'
)
if
len
(
source_position
)
==
1
:
self
.
source_position
=
numpy
.
array
(
source_position
.
pop
(),
dtype
=
HDS_coordinate_type
)
self
.
_
source_position
=
numpy
.
array
(
source_position
.
pop
(),
dtype
=
HDS_coordinate_type
)
else
:
logger
.
error
(
'
Multiple source positions are not supported: %s
'
,
source_position
)
raise
ValueError
(
'
Multiple source positions are not supported
'
)
if
len
(
source_name
)
==
1
:
self
.
source_name
=
source_name
.
pop
()
self
.
_
source_name
=
source_name
.
pop
()
else
:
raise
ValueError
(
'
Multiple source name are not supported
'
)
...
...
@@ -469,23 +534,23 @@ class HolographyDataset():
if
text
is
not
None
and
isinstance
(
text
,
str
):
logger
.
info
(
"
%s
"
,
text
)
if
hds
is
not
None
and
isinstance
(
hds
,
HolographyDataset
)
is
True
:
logger
.
info
(
"
Version = %s
"
,
hds
.
version
)
logger
.
info
(
"
Mode = %s
"
,
hds
.
mode
)
logger
.
info
(
"
RCU list =
"
,
hds
.
rcu_list
)
logger
.
info
(
"
SAS IDs = %s
"
,
hds
.
sas_ids
)
logger
.
info
(
"
Target station name = %s
"
,
hds
.
target_station_name
)
logger
.
info
(
"
Target station position = %s
"
,
hds
.
target_station_position
)
logger
.
info
(
"
Source name = %s
"
,
hds
.
source_name
)
logger
.
info
(
"
Source position = %s
"
,
hds
.
source_position
)
logger
.
info
(
"
Central beamlets = %s
"
,
hds
.
central_beamlets
)
logger
.
info
(
"
Start time = %s
"
,
hds
.
start_time
)
logger
.
info
(
"
End time = %s
"
,
hds
.
end_time
)
logger
.
info
(
"
Rotation matrix = %s
"
,
hds
.
rotation_matrix
)
logger
.
info
(
"
Antenna field position = %s
"
,
hds
.
antenna_field_position
)
logger
.
info
(
"
Reference stations = %s
"
,
hds
.
reference_stations
)
logger
.
info
(
"
Frequencies = %s
"
,
hds
.
frequencies
)
logger
.
info
(
"
Beamlets = %s
"
,
hds
.
beamlets
)
logger
.
info
(
"
RA DEC = %s
"
,
hds
.
ra_dec
)
logger
.
info
(
"
Version = %s
"
,
hds
.
_
version
)
logger
.
info
(
"
Mode = %s
"
,
hds
.
_
mode
)
logger
.
info
(
"
RCU list =
"
,
hds
.
_
rcu_list
)
logger
.
info
(
"
SAS IDs = %s
"
,
hds
.
_
sas_ids
)
logger
.
info
(
"
Target station name = %s
"
,
hds
.
_
target_station_name
)
logger
.
info
(
"
Target station position = %s
"
,
hds
.
_
target_station_position
)
logger
.
info
(
"
Source name = %s
"
,
hds
.
_
source_name
)
logger
.
info
(
"
Source position = %s
"
,
hds
.
_
source_position
)
logger
.
info
(
"
Central beamlets = %s
"
,
hds
.
_
central_beamlets
)
logger
.
info
(
"
Start time = %s
"
,
hds
.
_
start_time
)
logger
.
info
(
"
End time = %s
"
,
hds
.
_
end_time
)
logger
.
info
(
"
Rotation matrix = %s
"
,
hds
.
_
rotation_matrix
)
logger
.
info
(
"
Antenna field position = %s
"
,
hds
.
_
antenna_field_position
)
logger
.
info
(
"
Reference stations = %s
"
,
hds
.
_
reference_stations
)
logger
.
info
(
"
Frequencies = %s
"
,
hds
.
_
frequencies
)
logger
.
info
(
"
Beamlets = %s
"
,
hds
.
_
beamlets
)
logger
.
info
(
"
RA DEC = %s
"
,
hds
.
_
ra_dec
)
logger
.
info
(
"
Data = %s
"
,
hds
.
data
)
else
:
logger
.
warning
(
...
...
@@ -622,42 +687,42 @@ class HolographyDataset():
f
=
h5py
.
File
(
path
,
"
r
"
)
result
=
HolographyDataset
()
result
.
version
=
f
.
attrs
[
HDS_VERSION
]
result
.
mode
=
f
.
attrs
[
HDS_MODE
]
result
.
rcu_list
=
list
(
f
.
attrs
[
HDS_RCU_LIST
])
result
.
sas_ids
=
list
(
f
.
attrs
[
HDS_SAS_ID
])
result
.
target_station_name
=
f
.
attrs
[
HDS_TARGET_STATION_NAME
]
result
.
target_station_position
=
list
(
f
.
attrs
[
HDS_TARGET_STATION_POSITION
])
result
.
source_name
=
f
.
attrs
[
HDS_SOURCE_NAME
]
result
.
source_position
=
numpy
.
array
(
f
.
attrs
[
HDS_SOURCE_POSITION
])
(
result
.
start_time
,
result
.
end_time
)
=
f
.
attrs
[
HDS_OBSERVATION_TIME
]
result
.
rotation_matrix
=
f
.
attrs
[
HDS_ROTATION_MATRIX
]
result
.
beamlets
=
list
(
f
.
attrs
[
HDS_BEAMLETS
])
result
.
antenna_field_position
=
f
.
attrs
[
HDS_ANTENNA_FIELD_POSITION
].
tolist
()
result
.
reference_stations
=
bytestring_list_to_string
(
list
(
f
[
HDS_REFERENCE_STATION
]))
result
.
frequencies
=
list
(
f
[
HDS_FREQUENCY
])
result
.
_
version
=
f
.
attrs
[
HDS_VERSION
]
result
.
_
mode
=
f
.
attrs
[
HDS_MODE
]
result
.
_
rcu_list
=
list
(
f
.
attrs
[
HDS_RCU_LIST
])
result
.
_
sas_ids
=
list
(
f
.
attrs
[
HDS_SAS_ID
])
result
.
_
target_station_name
=
f
.
attrs
[
HDS_TARGET_STATION_NAME
]
result
.
_
target_station_position
=
list
(
f
.
attrs
[
HDS_TARGET_STATION_POSITION
])
result
.
_
source_name
=
f
.
attrs
[
HDS_SOURCE_NAME
]
result
.
_
source_position
=
numpy
.
array
(
f
.
attrs
[
HDS_SOURCE_POSITION
])
(
result
.
_
start_time
,
result
.
_
end_time
)
=
f
.
attrs
[
HDS_OBSERVATION_TIME
]
result
.
_
rotation_matrix
=
f
.
attrs
[
HDS_ROTATION_MATRIX
]
result
.
_
beamlets
=
list
(
f
.
attrs
[
HDS_BEAMLETS
])
result
.
_
antenna_field_position
=
f
.
attrs
[
HDS_ANTENNA_FIELD_POSITION
].
tolist
()
result
.
_
reference_stations
=
bytestring_list_to_string
(
list
(
f
[
HDS_REFERENCE_STATION
]))
result
.
_
frequencies
=
list
(
f
[
HDS_FREQUENCY
])
if
HDS_CALIBRATION_TABLES
in
f
:
for
mode
in
f
[
HDS_CALIBRATION_TABLES
]:
uri
=
'
/%s/%s
'
%
(
HDS_CALIBRATION_TABLES
,
mode
)
result
.
calibration_tables
[
mode
]
=
\
result
.
_
calibration_tables
[
mode
]
=
\
CalibrationTable
.
load_from_hdf
(
file_descriptor
=
f
,
uri
=
uri
)
if
HDS_DERIVED_CAL_TABLES
in
f
:
for
mode
in
f
[
HDS_DERIVED_CAL_TABLES
]:
uri
=
'
/%s/%s
'
%
(
HDS_DERIVED_CAL_TABLES
,
mode
)
result
.
calibration_tables
[
mode
]
=
\
result
.
_
calibration_tables
[
mode
]
=
\
CalibrationTable
.
load_from_hdf
(
file_descriptor
=
f
,
uri
=
uri
)
result
.
ra_dec
=
dict
()
result
.
_
ra_dec
=
dict
()
for
frequency
in
f
[
"
RA_DEC
"
].
keys
():
for
beamlet
in
f
[
"
RA_DEC
"
][
frequency
].
keys
():
if
frequency
not
in
result
.
ra_dec
:
result
.
ra_dec
[
frequency
]
=
dict
()
if
frequency
not
in
result
.
_
ra_dec
:
result
.
_
ra_dec
[
frequency
]
=
dict
()
result
.
ra_dec
[
frequency
][
beamlet
]
=
numpy
.
array
(
f
[
"
RA_DEC
"
][
frequency
][
beamlet
])
result
.
_
ra_dec
[
frequency
][
beamlet
]
=
numpy
.
array
(
f
[
"
RA_DEC
"
][
frequency
][
beamlet
])
beamlets
=
set
()
for
reference_station
in
f
[
"
CROSSCORRELATION
"
].
keys
():
...
...
@@ -667,7 +732,7 @@ class HolographyDataset():
result
.
data
=
f
[
'
CROSSCORRELATION
'
]
result
.
central_beamlets
=
HolographyDataset
.
_read_grouped_data
(
f
,
HDS_CENTRAL_BEAMLETS
)
result
.
_
central_beamlets
=
HolographyDataset
.
_read_grouped_data
(
f
,
HDS_CENTRAL_BEAMLETS
)
if
'
/DERIVED_DATA
'
in
f
:
result
.
derived_data
=
f
[
'
/DERIVED_DATA
'
]
...
...
@@ -683,7 +748,7 @@ class HolographyDataset():
def
insert_calibration_table
(
self
,
caltable
:
CalibrationTable
):
mode
=
caltable
.
observation_mode
self
.
calibration_tables
[
mode
]
=
caltable
self
.
_
calibration_tables
[
mode
]
=
caltable
def
store_to_file
(
self
,
path
):
"""
...
...
@@ -700,33 +765,33 @@ class HolographyDataset():
f
.
attrs
[
HDS_VERSION
]
=
HOLOGRAPHY_DATA_SET_VERSION
# RCU list
f
.
attrs
[
HDS_RCU_LIST
]
=
numpy
.
array
(
self
.
rcu_list
,
dtype
=
int
)
f
.
attrs
[
HDS_RCU_LIST
]
=
numpy
.
array
(
self
.
_
rcu_list
,
dtype
=
int
)
# RCU mode
f
.
attrs
[
HDS_MODE
]
=
self
.
mode
f
.
attrs
[
HDS_MODE
]
=
self
.
_
mode
# Moan... Again this needs to be stored like that.
f
.
attrs
[
HDS_SAS_ID
]
=
numpy
.
array
(
self
.
sas_ids
,
f
.
attrs
[
HDS_SAS_ID
]
=
numpy
.
array
(
self
.
_
sas_ids
,
dtype
=
h5py
.
special_dtype
(
vlen
=
str
))
f
.
attrs
[
HDS_TARGET_STATION_NAME
]
=
self
.
target_station_name
f
.
attrs
[
HDS_TARGET_STATION_POSITION
]
=
self
.
target_station_position
f
.
attrs
[
HDS_SOURCE_NAME
]
=
self
.
source_name
f
.
attrs
[
HDS_SOURCE_POSITION
]
=
self
.
source_position
f
.
attrs
[
HDS_OBSERVATION_TIME
]
=
numpy
.
array
([
self
.
start_time
,
self
.
end_time
])
f
.
attrs
[
HDS_ROTATION_MATRIX
]
=
self
.
rotation_matrix
f
.
attrs
[
HDS_ANTENNA_FIELD_POSITION
]
=
self
.
antenna_field_position
f
.
attrs
[
HDS_BEAMLETS
]
=
self
.
beamlets
f
.
attrs
[
HDS_TARGET_STATION_NAME
]
=
self
.
_
target_station_name
f
.
attrs
[
HDS_TARGET_STATION_POSITION
]
=
self
.
_
target_station_position
f
.
attrs
[
HDS_SOURCE_NAME
]
=
self
.
_
source_name
f
.
attrs
[
HDS_SOURCE_POSITION
]
=
self
.
_
source_position
f
.
attrs
[
HDS_OBSERVATION_TIME
]
=
numpy
.
array
([
self
.
_
start_time
,
self
.
_
end_time
])
f
.
attrs
[
HDS_ROTATION_MATRIX
]
=
self
.
_
rotation_matrix
f
.
attrs
[
HDS_ANTENNA_FIELD_POSITION
]
=
self
.
_
antenna_field_position
f
.
attrs
[
HDS_BEAMLETS
]
=
self
.
_
beamlets
# Store the list of reference stations and _frequencies. We just
# want to keep 'em around for quick reference.
f
[
HDS_REFERENCE_STATION
]
=
to_numpy_array_string
(
self
.
reference_stations
)
f
[
HDS_FREQUENCY
]
=
self
.
frequencies
f
[
HDS_REFERENCE_STATION
]
=
to_numpy_array_string
(
self
.
_
reference_stations
)
f
[
HDS_FREQUENCY
]
=
self
.
_
frequencies
f
.
create_group
(
HDS_CALIBRATION_TABLES
)
for
mode
in
self
.
calibration_tables
:
self
.
calibration_tables
[
mode
].
store_to_hdf
(
f
,
'
/{}/{}
'
.
format
(
HDS_CALIBRATION_TABLES
,
mode
))
for
mode
in
self
.
_
calibration_tables
:
self
.
_
calibration_tables
[
mode
].
store_to_hdf
(
f
,
'
/{}/{}
'
.
format
(
HDS_CALIBRATION_TABLES
,
mode
))
for
mode
in
self
.
derived_calibration_tables
:
self
.
derived_calibration_tables
[
mode
].
store_to_hdf
(
f
,
'
/{}/{}
'
.
format
(
...
...
@@ -734,7 +799,7 @@ class HolographyDataset():
mode
))
HolographyDataset
.
_store_grouped_data
(
h5file
=
f
,
uri
=
'
/RA_DEC
'
,
data_to_store
=
self
.
ra_dec
)
data_to_store
=
self
.
_
ra_dec
)
# We create groups for the reference stations and the _frequencies.
# Then we store the data samples [XX, YY, XY, YX, t, l, m, flag]
...
...
@@ -746,7 +811,7 @@ class HolographyDataset():
HolographyDataset
.
_store_grouped_data
(
h5file
=
f
,
uri
=
HDS_CENTRAL_BEAMLETS
,
data_to_store
=
self
.
central_beamlets
)
data_to_store
=
self
.
_
central_beamlets
)
if
self
.
derived_data
:
self
.
_store_grouped_data
(
h5file
=
f
,
uri
=
'
/DERIVED_DATA
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment