Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lofar2.0/tango
  • mckenna/tango
2 results
Show changes
Commits on Source (2)
......@@ -161,6 +161,8 @@ Next change the version in the following places:
# Release Notes
* 0.39.10 Use ITRF2014 and extrapolate to current half year by default
* 0.39.9 Minor speedup in observation start (do not wait for metadata to propagate)
* 0.39.8 Allow station manager to use configurable state transition timeouts.
Use the `hibernate_transition_timeout_RW`, `standby_transition_timeout_RW`
......
0.39.9
0.39.10
......@@ -5,6 +5,7 @@
"""
import logging
import datetime
from enum import IntEnum
from typing import List, Dict
......@@ -243,15 +244,16 @@ class AF(LOFARDevice):
"be computed from ETRS89",
dtype="DevString",
mandatory=False,
default_value="ITRF2005",
default_value="ITRF2014",
)
ITRF_Reference_Epoch = device_property(
doc="Reference epoch in which the ITRF coordinates are provided, or are to "
"be extrapolated from ETRS89",
"be extrapolated from ETRS89. If set to 0.0, the extrapolation from ETRS"
"will be done rounded to the last half year (f.e. 2015.5 for november 2015)",
dtype="DevFloat",
mandatory=False,
default_value=2015.5,
default_value=0.0, # LOFAR1 used 2015.5,
)
PQR_to_ETRS_rotation_matrix = device_property(
......@@ -614,6 +616,23 @@ class AF(LOFARDevice):
)
nr_antennas_R = attribute(doc="Number of Antennas in this field", dtype=numpy.int32)
@attribute(
doc="Epoch used to extrapolate the ITRF model to.",
dtype=numpy.float64,
unit="years",
)
def ITRF_Reference_Epoch_R(self):
if self.ITRF_Reference_Epoch > 2000.0:
return self.ITRF_Reference_Epoch
# return current year as a float, rounded
# down to half a year.
now = datetime.datetime.now()
if now.month <= 6:
return numpy.float64(now.year + 0.0)
else:
return numpy.float64(now.year + 0.5)
def __init__(self, cl, name):
self.sdpfirmware_proxy = None
self.sdp_proxy = None
......@@ -810,9 +829,8 @@ class AF(LOFARDevice):
# calculate them from ETRS coordinates if not, using the configured ITRF
# reference
etrs_coordinates = numpy.array(self.Antenna_Field_Reference_ETRS).reshape(N_xyz)
return ETRS_to_ITRF(
etrs_coordinates, self.ITRF_Reference_Frame, self.ITRF_Reference_Epoch
)
epoch = self.read_attribute("ITRF_Reference_Epoch_R")
return ETRS_to_ITRF(etrs_coordinates, self.ITRF_Reference_Frame, epoch)
def read_Antenna_Field_Reference_GEO_R(self):
return ITRF_to_GEO(self.read_Antenna_Field_Reference_ITRF_R())
......@@ -832,10 +850,9 @@ class AF(LOFARDevice):
etrs_coordinates = numpy.array(self.Antenna_Reference_ETRS).reshape(
self.nr_antennas, N_xyz
)
epoch = self.read_attribute("ITRF_Reference_Epoch_R")
return ETRS_to_ITRF(
etrs_coordinates, self.ITRF_Reference_Frame, self.ITRF_Reference_Epoch
)
return ETRS_to_ITRF(etrs_coordinates, self.ITRF_Reference_Frame, epoch)
def read_Antenna_Reference_GEO_R(self):
return ITRF_to_GEO(self.read_Antenna_Reference_ITRF_R())
......