Skip to content

Commit

Permalink
Update analytical_space.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WuShichao authored Jul 9, 2023
1 parent 0b668b0 commit 17124ef
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions pycbc/psd/analytical_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,20 +369,15 @@ def averaged_lisa_fplus_sq_approx(f, len_arm=2.5e9):
-----
Pease see Eq.(36) in <LISA-LCST-SGS-TN-001> for more details.
"""
from os import path
import requests
from scipy.interpolate import interp1d
import pycbc.psd
from astropy.utils.data import download_file

if len_arm != 2.5e9:
raise Exception("Currently only support 'len_arm=2.5e9'.")
module_path = pycbc.psd.__path__[0]
if path.exists(module_path+"/AvFXp2_Raw.npy") is False:
url = "https://zenodo.org/record/7497853/files/AvFXp2_Raw.npy"
response = requests.get(url, verify=False)
with open(module_path+"/AvFXp2_Raw.npy", 'wb') as file:
file.write(response.content)
freqs, fp_sq = np.load(module_path+"/AvFXp2_Raw.npy")
# Download the numerical LISA averaged response.
url = "https://zenodo.org/record/7497853/files/AvFXp2_Raw.npy"
file_path = download_file(url, cache=True)
freqs, fp_sq = np.load(file_path)
# Padding the end.
freqs = np.append(freqs, 2)
fp_sq = np.append(fp_sq, 0.0012712348970728724)
Expand Down

0 comments on commit 17124ef

Please sign in to comment.