-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFig_23.py
72 lines (60 loc) · 2.49 KB
/
Fig_23.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 25 15:08:54 2020
@author: Paolo Campeti
Script to reproduce Fig. (23) of the paper.
"""
import os.path as op
import numpy as np
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings("ignore")
import seaborn as sns
# seaborn settings
sns.set()
sns.set(style='whitegrid')
# Useful constant
C = 299792458. #speed of light in m/s
# loading response functions
# LISA
Resp_LISA = np.load(op.join(op.dirname(__file__),'files/Responses/Resp_LISA.npy'))
freq_LISA = np.load(op.join(op.dirname(__file__),'files/Responses/f_R_LISA.npy'))
Resp_LISA = Resp_LISA/Resp_LISA[0] # normalize response to 1 for plotting purpose
Resp_LISA = np.abs(Resp_LISA) # take absolute value for plotting purpose
# DECIGO
Resp_DECIGO = np.load(op.join(op.dirname(__file__),'files/Responses/Resp_DECIGO.npy'))
freq_DECIGO = np.load(op.join(op.dirname(__file__),'files/Responses/f_R_DECIGO.npy'))
Resp_DECIGO = Resp_DECIGO/Resp_DECIGO[0]
Resp_DECIGO = np.abs(Resp_DECIGO)
# DO
Resp_DO = np.load(op.join(op.dirname(__file__),'files/Responses/Resp_DO.npy'))
freq_DO = np.load(op.join(op.dirname(__file__),'files/Responses/f_R_DO.npy'))
Resp_DO = Resp_DO/Resp_DO[0]
Resp_DO = np.abs(Resp_DO)
# muAres
Resp_Ares = np.load(op.join(op.dirname(__file__),'files/Responses/Resp_muAres.npy'))
freq_Ares = np.load(op.join(op.dirname(__file__),'files/Responses/f_R_Ares.npy'))
Resp_Ares = Resp_Ares/Resp_Ares[0]
Resp_Ares = np.abs(Resp_Ares)
#BBO
Resp_BBO = np.load(op.join(op.dirname(__file__),'files/Responses/Resp_BBO.npy'))
freq_BBO = np.load(op.join(op.dirname(__file__),'files/Responses/f_R_BBO.npy'))
Resp_BBO = Resp_BBO/Resp_BBO[0]
Resp_BBO = np.abs(Resp_BBO)
# Plot Response Functions
fig = plt.figure()
ax = plt.gca()
ax.semilogx(freq_LISA, Resp_LISA, label='LISA', linewidth='2.0')
ax.plot(freq_DECIGO, Resp_DECIGO, label='DECIGO', linewidth='2.0')
ax.plot(freq_DO, Resp_DO, label='DO', linewidth='2.0')
ax.plot(freq_Ares, Resp_Ares, label=r'$\mu$Ares', linewidth='2.0')
ax.plot(freq_BBO, Resp_BBO, label='BBO', linewidth='2.0', color='black')
ax.set_xlim([1e-5, 5e3])
ax.set_ylim([-0.1, 1.1])
plt.xlabel(r'f $[Hz]$',fontsize = 10.0)
plt.ylabel(r'Normalized Overlap Reduction Function $|\mathcal{R}_{IJ}|$',fontsize = 10.0)
plt.tick_params(axis = 'both',which = 'major', labelsize = 10.0)
ax.legend(fontsize=12, loc='upper right', bbox_to_anchor=(1.3, 0.8))
plt.savefig(op.join(op.dirname(__file__),'figures/Fig_23.pdf'), format='pdf', dpi=1000, bbox_inches='tight')
plt.show()