def compute_nice_minmax(mp): mn = np.amin(mp) mx = np.amax(mp) emn = np.floor(np.log10(np.fabs(mn))) emx = np.ceil(np.log10(np.fabs(mx))) imn = int(10.**(-emn + 1) * mn) imx = int(10.**(-emx + 2) * mx) mno = imn * 10.**(emn - 1) mxo = imx * 10.**(emx - 2) return mno, mxo # Initialize the map calculators mc_HL = snl.MapCalculator([dets['Hanford'], dets['Livingstone']], f_pivot=f_ref) mc_HV = snl.MapCalculator([dets['Hanford'], dets['VIRGO']], f_pivot=f_ref) npix = hp.nside2npix(nside) theta, phi = hp.pix2ang(nside, np.arange(npix)) plt.figure(figsize=(7, 9)) for i, lf in enumerate([1, 2, 3]): f = 10.**lf resp_HL = mc_HL.get_antenna(0, 1, 0., f, theta, phi) resp_HV = mc_HV.get_antenna(0, 1, 0., f, theta, phi) mn, mx = compute_nice_minmax(np.real(resp_HL)) hp.mollview( np.real(resp_HL), sub=420 + 2 * i + 1, notext=True, cbar=True, min=mn,
rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) rc('text', usetex=True) t_obs = 1 f_ref = 63. nside = 16 obs_time = t_obs * 365 * 24 * 3600. freqs = np.geomspace(10., 1010., 1010) dets = [ snl.GroundDetector('Hanford', 46.4, -119.4, 171.8, 'data/aLIGO.txt'), snl.GroundDetector('Livingstone', 30.7, -90.8, 243.0, 'data/aLIGO.txt'), snl.GroundDetector('Virgo', 43.6, 10.5, 116.5, 'data/Virgo.txt'), snl.GroundDetector('KAGRA', 36.3, 137.2, 225.0, 'data/KAGRA.txt') ] mc = snl.MapCalculator(dets[:2], f_pivot=f_ref) pi2_HL = mc.get_pi_curve(obs_time, freqs, nside, no_autos=True, nsigma=2) mc = snl.MapCalculator(dets[:3], f_pivot=f_ref) pi2_HLV = mc.get_pi_curve(obs_time, freqs, nside, no_autos=True, nsigma=2) mc = snl.MapCalculator(dets[:4], f_pivot=f_ref) pi2_HLVK = mc.get_pi_curve(obs_time, freqs, nside, no_autos=True, nsigma=2) pi2_HLVKa = mc.get_pi_curve(obs_time, freqs, nside, no_autos=False, nsigma=2) # Plotting plt.plot(freqs, pi2_HL, 'k--', label='LIGO') plt.plot(freqs, pi2_HLV, 'k:', label='+ Virgo') plt.plot(freqs, pi2_HLVK, 'k-', label='+ KAGRA') plt.plot(freqs, pi2_HLVKa, 'k-.', label='+ auto correlations') plt.loglog() plt.xlim([10, 1000]) plt.ylim([1E-10, 1E-5])
import os import numpy as np import matplotlib.pyplot as plt import healpy as hp import schnell as snl from matplotlib import rc rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica'], 'size': 15}) rc('text', usetex=True) dets = [snl.LISADetector(i) for i in range(3)] # Correlation between detectors rho = snl.NoiseCorrelationLISA(dets[0]) mc = snl.MapCalculator(dets, f_pivot=1E-2, corr_matrix=rho) nside = 16 lfreqs = np.linspace(-4, 0, 101) freqs = 10.**lfreqs # One year obs_time = 365 * 24 * 3600. # 1-day intervals nframes = 24 * 365 t_frames = np.linspace(0, obs_time, nframes + 1)[:-1] inoi_tot = mc.get_Ninv_t(t_frames, freqs, nside, is_fspacing_log=True) def plot_inoise_map(inoi, lims=[None, None], which='', figname=None): hp.mollview( 1E-9 * np.sqrt(inoi), max=lims[1], min=lims[0],
import numpy as np import schnell as snl import matplotlib.pyplot as plt from matplotlib import rc rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) rc('text', usetex=True) t_obs = 4 f_ref = 1E-2 nside = 16 dets = [snl.LISADetector(i) for i in range(3)] rho = snl.NoiseCorrelationLISA(dets[0]) mc = snl.MapCalculator(dets, f_pivot=f_ref, corr_matrix=rho) freqs = np.geomspace(1E-4, 0.2, 1001) obs_time = t_obs * 365 * 24 * 3600 pi_LISA = mc.get_pi_curve(obs_time, freqs, nside, is_fspacing_log=True, nsigma=5, proj={ 'vectors': np.ones(3), 'deproject': True }) # Plotting plt.plot(freqs, pi_LISA, 'k--', label='LISA') plt.loglog() plt.xlabel(r'$f\,[{\rm Hz}]$', fontsize=16)
fname_psd='data/ET.txt', detector_id=i) for i in range(3)] dets = {'Hanford': snl.GroundDetector('Hanford', 46.4, -119.4, 171.8, 'data/aLIGO.txt'), 'Livingstone': snl.GroundDetector('Livingstone', 30.7, -90.8, 243.0, 'data/aLIGO.txt'), 'VIRGO': snl.GroundDetector('Virgo', 43.6, 10.5, 116.5, 'data/Virgo.txt'), 'Kagra': snl.GroundDetector('KAGRA', 36.3, 137.2, 225.0, 'data/KAGRA.txt')} print("HLVK") detectors = [dets['Hanford'], dets['Livingstone'], dets['VIRGO'], dets['Kagra']] no_autos = [True, True, True, True] mc_HLVK = snl.MapCalculator(detectors, f_pivot=f_ref) nl_HLVK = mc_HLVK.get_N_ell(obs_time, freqs, nside, no_autos=no_autos) detectors = [dets['Hanford'], dets['Livingstone'], dets['VIRGO'], dets['Kagra']] + et corr = np.array([[1., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0.], [0., 1., 0., 0., 1., rE, rE], [0., 1., 0., 0., rE, 1., rE], [0., 1., 0., 0., rE, rE, 1.]]) mc_HLVKE = snl.MapCalculator(detectors, f_pivot=f_ref, corr_matrix=corr) print("HLVKEx") no_autos = [[True, False, False, False, False, False, False],
rc('text', usetex=True) t_obs = 1 f_ref = 63 nside = 64 obs_time = t_obs * 365 * 24 * 3600. freqs = np.linspace(10., 1010., 101) dets = [ snl.GroundDetector('Hanford', 46.4, -119.4, 171.8, 'data/aLIGO.txt'), snl.GroundDetector('Livingstone', 30.7, -90.8, 243.0, 'data/aLIGO.txt'), snl.GroundDetector('Virgo', 43.6, 10.5, 116.5, 'data/Virgo.txt'), snl.GroundDetector('KAGRA', 36.3, 137.2, 225.0, 'data/KAGRA.txt') ] print("0") mc = snl.MapCalculator(dets, f_pivot=f_ref, spectral_index=0.) nl_a0 = mc.get_N_ell(obs_time, freqs, nside, no_autos=True) print("2/3") mc = snl.MapCalculator(dets, f_pivot=f_ref, spectral_index=2. / 3.) nl_a2o3 = mc.get_N_ell(obs_time, freqs, nside, no_autos=True) print("3") mc = snl.MapCalculator(dets, f_pivot=f_ref, spectral_index=3.) nl_a3 = mc.get_N_ell(obs_time, freqs, nside, no_autos=True) ls = np.arange(3 * nside) plt.figure() plt.plot(ls, (ls + 0.5) * nl_a3, 'k--', label=r'$\alpha=3$') plt.plot(ls, (ls + 0.5) * nl_a2o3, 'k-', label=r'$\alpha=2/3$') plt.plot(ls, (ls + 0.5) * nl_a0, 'k:', label=r'$\alpha=0$') plt.loglog() plt.xlabel(r'$\ell$', fontsize=16)
f_ref = 63. nside = 16 dets = { 'Hanford': snl.GroundDetector('Hanford', 46.4, -119.4, 171.8, 'data/aLIGO.txt'), 'Livingstone': snl.GroundDetector('Livingstone', 30.7, -90.8, 243.0, 'data/aLIGO.txt'), 'VIRGO': snl.GroundDetector('Virgo', 43.6, 10.5, 116.5, 'data/Virgo.txt'), 'Kagra': snl.GroundDetector('KAGRA', 36.3, 137.2, 225.0, 'data/KAGRA.txt') } # Initialize the map calculator mcal_hl = snl.MapCalculator([dets['Hanford'], dets['Livingstone']], f_pivot=f_ref) mcal_all = snl.MapCalculator([d for _, d in dets.items()], f_pivot=f_ref) freqs = np.linspace(10., 1010., 101) # One day obs_time = 24 * 3600. # 10-min intervals nframes = 24 * 6 t_frames = np.linspace(0, obs_time, nframes + 1)[:-1] inoi_hl = mcal_hl.get_Ninv_t(t_frames, freqs, nside, no_autos=True) def plot_inoise_map(inoi, lims=[None, None], which='', figname=None): hp.mollview( 1E-5 * np.sqrt(inoi),
import numpy as np import schnell as snl import matplotlib.pyplot as plt from matplotlib import rc rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) rc('text', usetex=True) t_obs = 4 f_ref = 1E-2 nside = 32 dets = [snl.LISADetector(i) for i in range(3)] rho = snl.NoiseCorrelationLISA(dets[0]) mc_auto = snl.MapCalculator([dets[0]], f_pivot=f_ref) mca = snl.MapCalculator(dets, f_pivot=f_ref, corr_matrix=rho) freqs = np.geomspace(1E-4, 1, 201) obs_time = t_obs * 365 * 24 * 3600 nl_auto = mc_auto.get_N_ell(obs_time, freqs, nside, is_fspacing_log=True) nl_AE = mca.get_N_ell(obs_time, freqs, nside, is_fspacing_log=True, proj={ 'vectors': np.ones(3), 'deproject': True }) nl_all = mca.get_N_ell(obs_time, freqs, nside, is_fspacing_log=True) ls = np.arange(3 * nside) plt.figure()