Skip to content

Commit

Permalink
BHaH_psi4_to_phase_amp_omega_FFI_strain_psi4check.py: sync with lates…
Browse files Browse the repository at this point in the history
…t black
  • Loading branch information
zachetienne committed Apr 16, 2024
1 parent dfd674b commit 6fba0af
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions BHaH_psi4_to_phase_amp_omega_FFI_strain_psi4check.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Author: Zachariah B. Etienne
zachetie **at** gmail **dot* com
"""

import sys
from typing import Tuple, Dict

Expand Down Expand Up @@ -137,9 +138,7 @@ def compute_second_derivative_in_time(
second_derivative[1:-1] = (data[:-2] - 2 * data[1:-1] + data[2:]) / (dt**2)

# Endpoint 0: forward finite difference (downwind)
second_derivative[0] = (2 * data[0] - 5 * data[1] + 4 * data[2] - data[3]) / (
dt**2
)
second_derivative[0] = (2 * data[0] - 5 * data[1] + 4 * data[2] - data[3]) / (dt**2)

# Endpoint n-1: backward finite difference (upwind)
second_derivative[-1] = (2 * data[-1] - 5 * data[-2] + 4 * data[-3] - data[-4]) / (
Expand Down Expand Up @@ -341,7 +340,9 @@ def main() -> None:
and r/M value are provided via the command line.
"""
if len(sys.argv) != 2:
print("Usage: python3 BHaH_psi4_to_phase_amp_omega_FFI_strain_psi4check.py <extraction radius (r/M)>")
print(
"Usage: python3 BHaH_psi4_to_phase_amp_omega_FFI_strain_psi4check.py <extraction radius (r/M)>"
)
sys.exit()
extraction_radius = float(sys.argv[1])
generic_file_name = construct_generic_filename(extraction_radius)
Expand Down

0 comments on commit 6fba0af

Please sign in to comment.