Loading [MathJax]/extensions/TeX/AMSsymbols.js
LAL 7.7.0.1-da3b9d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Detailed Description

This module provides a Python class for generating antenna response functions.

By default the class uses its own implementation of the antenna response functions, but it also provides a wrapper to the equivalent functions within LAL.

Author
Matthew Pitkin (matth.nosp@m.ew.p.nosp@m.itkin.nosp@m.@lig.nosp@m.o.org)

Synopsis

from lal import antenna

Examples

A simple example of just getting the antenna response for LHO at a single time for a single sky position and polarization angle would be:

from lal import antenna
ra = 1.2 # right ascension in radians
dec = -0.3 # declination in radians
psi = 1.5 # polarization angle in radians
times = 1000000000. # time (GPS seconds)
resp = antenna.AntennaResponse('H1', ra, dec, psi=psi, times=times)
print(resp.plus)

To produce plots of the antenna responses over the sky for the different polarizations, assuming a detector at the North Pole, one could use:

import numpy as np
import lal
from lal.antenna import AntennaResponse
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as pl
# set a LALFrDetector object for the North Pole
frdt = lal.FrDetector()
frdt.name = 'NORTHPOLE'
frdt.prefix = 'N1'
frdt.vertexLongitudeRadians = 0.
frdt.vertexLatitudeRadians = np.pi/2.
frdt.vertexElevation = 0.
frdt.xArmAltitudeRadians = 0.
frdt.xArmAzimuthRadians = 0.
frdt.yArmAltitudeRadians = 0.
frdt.yArmAzimuthRadians = np.pi/2. # y-arm 90 degs from x-arm
frdt.xArmMidpoint = 2000. # 4km long arms
frdt.yArmMidpoint = 2000.
# create lal.Detector object
det = lal.Detector()
lal.CreateDetector(det, frdt, lal.LALDETECTORTYPE_IFODIFF)
# create RA/dec grids uniform on sphere
ras = np.linspace(0, 2.*np.pi, 150)
decs = np.arcsin(np.linspace(-1, 1, 150))
# create antenna response on the sky grid
resp = AntennaResponse(det, ras, decs, psi=0.0, times=900000000.0, vector=True,
scalar=True)
# get equatorial to cartesian factors
xfac = np.cos(resp.dec_mesh)*np.cos(resp.ra_mesh)
yfac = np.cos(resp.dec_mesh)*np.sin(resp.ra_mesh)
zfac = np.sin(resp.dec_mesh)
fig = pl.figure(figsize=(12, 7))
for i, mode in enumerate(['plus', 'x', 'b', 'cross', 'y', 'l']):
r = np.abs(resp.response[mode]) # get absolute values of response
# convert from equatorial coordinates to cartesian
X, Y, Z = r*xfac, r*yfac, r*zfac
ax = fig.add_subplot(2, 3, i+1, projection='3d')
ax.plot_surface(X, Y, Z, cmap=pl.cm.viridis, linewidth=0, rstride=1, cstride=1)
ax.set_aspect('equal')
ax.set_title(mode)
fig.tight_layout()
pl.show()

which will display:

Data Structures

class  lal.antenna.AntennaResponse
 

Variables

dictionary lal.antenna.DETMAP
 mapping between detector names and LALCachedDetectors More...
 
dictionary lal.antenna.VAR_RANGES
 The ranges of variables required for the antenna response (for look-up table generation) More...
 

Variable Documentation

◆ DETMAP

dictionary lal.antenna.DETMAP
Initial value:
1= {'H1': LALDetectorIndexLHODIFF,
2 'H2': LALDetectorIndexLHODIFF,
3 'LHO': LALDetectorIndexLHODIFF,
4 'L1': LALDetectorIndexLLODIFF,
5 'LLO': LALDetectorIndexLLODIFF,
6 'G1': LALDetectorIndexGEO600DIFF,
7 'GEO': LALDetectorIndexGEO600DIFF,
8 'GEO600': LALDetectorIndexGEO600DIFF,
9 'V1': LALDetectorIndexVIRGODIFF,
10 'VIRGO': LALDetectorIndexVIRGODIFF,
11 'T1': LALDetectorIndexTAMA300DIFF,
12 'TAMA': LALDetectorIndexTAMA300DIFF,
13 'TAMA300': LALDetectorIndexTAMA300DIFF,
14 'K1': LALDetectorIndexKAGRADIFF,
15 'KAGRA': LALDetectorIndexKAGRADIFF,
16 'LCGT': LALDetectorIndexKAGRADIFF,
17 'I1': LALDetectorIndexLIODIFF,
18 'LIO': LALDetectorIndexLIODIFF,
19 'E1': LALDetectorIndexE1DIFF,
20 'E2': LALDetectorIndexE2DIFF,
21 'E3': LALDetectorIndexE3DIFF}

mapping between detector names and LALCachedDetectors

Definition at line 144 of file antenna.py.

◆ VAR_RANGES

dictionary lal.antenna.VAR_RANGES
Initial value:
1= {'psi': [0., 2.*np.pi],
2 'time': [0., DAYSID_SI],
3 'ra': [0., 2.*np.pi],
4 'dec': [-1., 1.]}

The ranges of variables required for the antenna response (for look-up table generation)

Definition at line 168 of file antenna.py.