Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rpoleski/MulensModel
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoleski committed Feb 16, 2023
2 parents e402809 + 1666e2b commit 5746878
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions source/MulensModel/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,26 +220,18 @@ def _calculate_delta_N_E(self):
raise NotImplementedError(
"The topocentric parallax effect not implemented yet")

def _project_delta(self, delta=None):
def _project_delta(self):
"""
Project N and E parallax offset vector onto the tau, beta plane.
"""
if delta is None:
delta = self.parallax_delta_N_E
delta = self.parallax_delta_N_E

delta_tau = (delta['N'] * self.parameters.pi_E_N +
delta['E'] * self.parameters.pi_E_E)
delta_beta = (-delta['N'] * self.parameters.pi_E_E +
delta['E'] * self.parameters.pi_E_N)
return [delta_tau, delta_beta]

def _annual_parallax_trajectory(self):
"""calculate annual parallax component of trajectory"""

# Calculate the parallax offsets
delta_annual = self._get_delta_annual()
return self._project_delta(delta_annual)

def _get_delta_annual(self):
"""
calculates projected Earth positions required by annual parallax
Expand Down Expand Up @@ -284,11 +276,6 @@ def _get_delta_annual(self):
Trajectory._get_delta_annual_last = out
return out

def _satellite_parallax_trajectory(self):
"""calculate satellite parallax component of trajectory"""
delta_satellite = self._get_delta_satellite()
return self._project_delta(delta_satellite)

def _get_delta_satellite(self):
"""
calculates differences of Earth and satellite positions
Expand Down

0 comments on commit 5746878

Please sign in to comment.