Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adivijaykumar committed Dec 16, 2024
1 parent bead5bc commit dba3ee5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions mayawaves/coalescence.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,6 @@ def set_radiation_frame(self, center_of_mass_corrected: bool = False):
Args:
center_of_mass_corrected (:obj:`bool`, optional): Whether to correct for center of mass drift. Default False. If false, the frame is set back to the original, raw frame.
"""
import sys
if sys.version_info.major == 3 and sys.version_info.minor > 10:
warnings.warn('Python version too recent to be compatible with Scri package. Unable to change the radiation frame.')
raise ImportError('Unable to change the radiation frame. Python version too recent to be compatible with Scri package. If you would like the ability to move to center-of-mass corrected frame, use python <= 3.10.')

from mayawaves.radiation import Frame

if center_of_mass_corrected:
Expand Down
4 changes: 2 additions & 2 deletions mayawaves/radiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,8 +1336,8 @@ def _set_alpha_beta_for_com_transformation(self, com_time, center_of_mass):
x0 = np.zeros(3)
xt0 = np.zeros(3)
for i in range(3):
x0[i] = scipy.integrate.trapz(com_maya_int[:, i], t_com_maya_int) / (tf - ti)
xt0[i] = scipy.integrate.trapz(com_maya_int[:, i] * t_com_maya_int, t_com_maya_int) / (tf - ti)
x0[i] = scipy.integrate.trapezoid(com_maya_int[:, i], t_com_maya_int) / (tf - ti)
xt0[i] = scipy.integrate.trapezoid(com_maya_int[:, i] * t_com_maya_int, t_com_maya_int) / (tf - ti)

# calculate alpha and beta with the Newtonian approach
self.__alpha = (4 * (tf ** 2 + tf * ti + ti * 2) * x0 - 6 * (tf + ti) * xt0) / (tf - ti) ** 2
Expand Down

0 comments on commit dba3ee5

Please sign in to comment.