Commit 162e4193 by Uddeepta Deka

initial mismatch notebook added

parent f228e408
......@@ -209,7 +209,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.10.15"
}
},
"nbformat": 4,
......
......@@ -61,50 +61,23 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"id": "8bad1244-8a25-42dc-8348-37ac4d090762",
"metadata": {},
"outputs": [],
"source": [
"from astropy.cosmology import FlatLambdaCDM\n",
"import astropy.units as u\n",
"from astropy.constants import c, G, eps0, e, M_sun"
"from astropy.constants import c, G, eps0, e, M_sun\n",
"import lal"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "af540765-17f0-434c-ba3d-de37640e3fcc",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1080784.208277988 kg(3/2) m(1/2) / (A2 s2)\n"
]
}
],
"source": [
"fac = (128 * eps0 * c * np.sqrt(G))\n",
"fac = 3/fac.si\n",
"print(fac)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "e3087b17-73e2-4213-9c47-18aa5cff8254",
"execution_count": 4,
"id": "cf623760-221e-4dd1-ab2b-b9f15065ba47",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2.012690446026682e-13 1 / m(1/2)\n"
]
}
],
"outputs": [],
"source": [
"cosmo = FlatLambdaCDM(H0=70, Om0=0.3)\n",
"zs = 2.0\n",
......@@ -112,26 +85,37 @@
"D_s = cosmo.angular_diameter_distance(zs)\n",
"D_l = cosmo.angular_diameter_distance(zl)\n",
"D_ls = cosmo.angular_diameter_distance_z1z2(zl, zs)\n",
"dist_fac = np.sqrt(D_s/D_l/D_ls).si\n",
"print(dist_fac)"
"Ml = 100 * lal.MRSUN_SI * u.m"
]
},
{
"cell_type": "markdown",
"id": "88c5ba85-2906-44b9-acab-f1616fdbaf34",
"metadata": {},
"source": [
"We compute the factor \n",
"$$\n",
" \\left(\\frac{Q_{\\text{eff}}}{M_L}\\right)^2\\sqrt{\\frac{D_s/M_L}{(D_l/M_L) (D_{ls}/M_L)}}\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "f1d9ccba-6000-43b7-9337-b19e85eacffc",
"execution_count": 6,
"id": "9cb726d1-57e6-41ca-b58b-1506bbeabe14",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2.175284050217618e-07 kg(3/2) / (A2 s2)\n"
"7.734141245310819e-11\n"
]
}
],
"source": [
"print(fac * dist_fac)"
"fac = (np.sqrt(D_s.si * Ml / D_l.si / D_ls.si))\n",
"print(fac)"
]
},
{
......@@ -646,9 +630,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "igwn-py39",
"language": "python",
"name": "python3"
"name": "igwn-py39"
},
"language_info": {
"codemirror_mode": {
......@@ -660,7 +644,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.9.19"
}
},
"nbformat": 4,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,8 +2,14 @@
import os
import numpy as np
y_arr = [0.5, 1.0, 2.0]
q_arr = [-0.5, 0.1, 0.5]
## The following config. is used to generate F(t), F(w), h_U, h_L sample waveforms
# y_arr = [0.5, 1.0, 2.0]
# q_arr = [-0.5, 0.1, 0.5]
# t_max = 200
## The following config. is used to generate data for Q=0 mismatch checks
y_arr = np.geomspace(0.1, 3, 50)
Ml_arr = np.geomspace(1, 1e5, 50)
t_max = 200
# y_arr = np.logspace(-1, np.log10(2.0), 3000)
......@@ -28,6 +34,7 @@ vars = {
"Log": dir_path+"logs/log.log.$(Cluster).$(Process).txt",
"notify_user": "uddeepta.deka@icts.res.in",
"Notification": "Never",
"requirements" : '(Machine != "node72.alice.icts.res.in")',
"request_cpus": 4,
"request_memory": 1024,
}
......@@ -36,5 +43,6 @@ with open(dir_path + condor_filename, 'w') as fp:
for key, val in vars.items():
fp.write(f"{key}\t = {val}\n")
for y in y_arr:
for q in q_arr:
fp.write(f"\narguments = y {y} q {q} t_max {t_max} folder_path {dir_path}results/\nQueue\n")
\ No newline at end of file
# for q in q_arr:
for Ml in Ml_arr:
fp.write(f"\narguments = y {y} Ml {Ml} t_max {t_max} folder_path {dir_path}results/\nQueue\n")
\ No newline at end of file
......@@ -47,15 +47,15 @@ def lens_ampl_function(w, y_l, intrp_hyp1f1=None):
w_2 = w[np.where(w > w_max)[0]]
if len(w_1) == 0:
F_f = lens_ampl_function_geom_optics(w, y_l)
F_f = lens_ampl_function_geom_optics(w_2, y_l)
else:
if len(w_2) != 0:
F_w = lens_ampl_function_wave_optics(w, y_l, intrp_hyp1f1=intrp_hyp1f1)
F_g = lens_ampl_function_geom_optics(w, y_l)
F_w = lens_ampl_function_wave_optics(w_1, y_l, intrp_hyp1f1=intrp_hyp1f1)
F_g = lens_ampl_function_geom_optics(w_2, y_l)
F_f = np.concatenate((F_w,F_g))
else:
F_f = lens_ampl_function_wave_optics(w, y_l, intrp_hyp1f1=intrp_hyp1f1)
F_f = lens_ampl_function_wave_optics(w_1, y_l, intrp_hyp1f1=intrp_hyp1f1)
return F_f
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment