コード例 #1
0
    def itrs2gcrs(self):
        """The ITRS to GCRS transformation matrix for the given times

        Returns:
            Numpy-float array with transformation matrices, shape is (len(self), 3, 3).
        """
        return rotation.Q(self) @ rotation.R(self) @ rotation.W(self)
コード例 #2
0
    def itrs2gcrs_dot(self):
        """The derivative of ITRS to GCRS transformation matrix for the given times

        Returns:
            Numpy-float array with transformation matrices, shape is (len(self), 3, 3).
        """
        return rotation.Q(self) @ rotation.dR_dut1(self) @ rotation.W(self)
コード例 #3
0
ファイル: slr_eop_lod.py プロジェクト: yxw027/where
def eop_lod(dset):
    """Calculate the partial derivative of the Earth Orientation Parameter Length of Day

    Args:
        data:     A Dataset containing model data.

    Returns:
        Tuple: Array of partial derivatives, and list of names of derivatives
    """

    unit_vector = dset.sat_pos.gcrs.pos.val - dset.site_pos.gcrs.val
    unit_vector = unit_vector / np.linalg.norm(unit_vector)

    # Use only core sites for EOP estimation
    core_sites = config.tech.core_sites.list
    is_core_station = np.in1d(dset.station, core_sites)

    column_name = ["lod"]

    sat_dir = unit_vector[:, None, :]
    dR_dut1 = rotation.dR_dut1(dset.time)

    dt = (dset.time.jd - dset.time.mean.jd)[:, None, None]
    # lod = - ut1_rate * 1 day -> lod_partial = - ut1_rate_partial / 1 day

    pick_relevant_data = np.zeros((dset.num_obs, 3, 3))

    for j in range(0, dset.num_obs):
        if is_core_station[j]:
            pick_relevant_data[j] += np.eye(3)

    partials = (sat_dir @ rotation.Q(dset.time) @ dR_dut1 @ rotation.W(
        dset.time) @ dset.site_pos.trs.val[:, :, None] @ dt)[:, :, 0]

    return partials, column_name, "meter * radians / seconds"
コード例 #4
0
def eop_nut(dset):
    """Calculate the partial derivative of the celestial pole offset Earth Orientation Parameters

    Args:
        data:     A Dataset containing model data.

    Returns:
        Tuple: Array of partial derivatives, and list of names of derivatives
    """
    column_names = ["x", "y"]
    partials = np.zeros((dset.num_obs, 2))
    src_dir = dset.src_dir.unit_vector[:, None, :]
    baseline = (dset.site_pos_2.trs.pos - dset.site_pos_1.trs.pos).mat

    partials[:, 0] = -(src_dir @ rotation.dQ_dX(dset.time) @ rotation.R(
        dset.time) @ rotation.W(dset.time) @ baseline)[:, 0, 0]
    partials[:, 1] = -(src_dir @ rotation.dQ_dY(dset.time) @ rotation.R(
        dset.time) @ rotation.W(dset.time) @ baseline)[:, 0, 0]

    return partials, column_names, "meter per radian"
コード例 #5
0
ファイル: vlbi_eop_dut1.py プロジェクト: yxw027/where
def eop_dut1(dset):
    """Calculate the partial derivative of the dUT1 Earth Orientation Parameter

    Args:
        data:     A Dataset containing model data.

    Returns:
        Tuple: Array of partial derivatives, and list of names of derivatives
    """
    column_name = ["dut1"]

    src_dir = dset.src_dir.unit_vector[:, None, :]
    baseline = (dset.site_pos_2.trs.pos - dset.site_pos_1.trs.pos).mat
    dR_dut1 = rotation.dR_dut1(dset.time)
    partials = -(src_dir @ rotation.Q(dset.time) @ dR_dut1 @ rotation.W(
        dset.time) @ baseline)[:, :, 0]

    return partials, column_name, "meter * (radians per second)"
コード例 #6
0
def eop_dut1_rate(dset):
    """Calculate the partial derivative of the rate of the dUT1 Earth Orientation Parameter

    Args:
        data:     A Dataset containing model data.

    Returns:
        Tuple: Array of partial derivatives, and list of names of derivatives
    """
    column_name = ["ddut1"]

    src_dir = dset.src_dir.unit_vector[:, None, :]
    baseline = (dset.site_pos_2.itrs_pos - dset.site_pos_1.itrs_pos)[:, :, None]
    dR_dut1 = rotation.dR_dut1(dset.time)
    dt = (dset.time.jd - dset.time.mean.jd)[:, None, None]
    partials = -(src_dir @ rotation.Q(dset.time) @ dR_dut1 @ rotation.W(dset.time) @ baseline @ dt)[:, :, 0]

    return partials, column_name, "meter * radians * days / seconds"
コード例 #7
0
def eop_lod(dset):
    """Calculate the partial derivative of the Earth Orientation Parameter Length of Day

    Args:
        data:     A Dataset containing model data.

    Returns:
        Tuple: Array of partial derivatives, and list of names of derivatives
    """
    column_name = ["lod"]

    src_dir = dset.src_dir.unit_vector[:, None, :]
    baseline = (dset.site_pos_2.trs.pos - dset.site_pos_1.trs.pos).mat
    dR_dut1 = rotation.dR_dut1(dset.time)
    dt = (dset.time.jd - dset.time.mean.jd)[:, None, None]
    # lod = - ut1_rate * 1 day -> lod_partial = - ut1_rate_partial / 1 day
    partials = (src_dir @ rotation.Q(dset.time) @ dR_dut1 @ rotation.W(
        dset.time) @ baseline @ dt)[:, :, 0]

    return partials, column_name, "meter * radians / seconds"
コード例 #8
0
def eop_dut1(dset):
    """Calculate the partial derivative of the dUT1 Earth Orientation Parameter

    Args:
        data:     A Dataset containing model data.

    Returns:
        Tuple: Array of partial derivatives, and list of names of derivatives
    """

    unit_vector = dset.sat_pos.gcrs.pos.val - dset.site_pos.gcrs.val
    unit_vector = unit_vector / np.linalg.norm(unit_vector)

    # Use only core sites for EOP estimation
    core_sites = config.tech.core_sites.list
    is_core_station = np.in1d(dset.station, core_sites)

    column_name = ["dut1"]

    partials = np.zeros(dset.num_obs)

    sat_dir = unit_vector[:, None, :]
    dR_dut1 = rotation.dR_dut1(dset.time)

    pick_relevant_data = np.zeros((dset.num_obs, 3, 3))

    for j in range(0, dset.num_obs):
        if is_core_station[j]:
            pick_relevant_data[j] += np.eye(3)

    partials = (
        sat_dir
        @ rotation.Q(dset.time)
        @ dR_dut1
        @ rotation.W(dset.time)
        @ pick_relevant_data
        @ dset.site_pos.trs.val[:, :, None]
    )[:, :, 0]

    return partials, column_name, "meter * (radians per second)"