Quick calculation tools

Quasar coordinates

qsotools. coordinates ( coord , xdipp = 17.3 , ydipp = - 61 , ** kwargs ) [source]

Convert coordinates and get distance to alpha dipole. Right ascension and declination are converted into different formats so that either of the outputs can be used for analysis.

Parameters :
coord str

Coordinates of object. 3 formats are accepted, either copy/paste from SIMBAD with either colon or space separating the degree, minutes and seconds, or coordinates in decimal degrees are also accepted.

xdipp float

Right ascension of alpha dipole (in degrees)

ydipp float

Declination of alpha dipole (in degrees)

Returns :
ra float

Right ascension in degrees

dec float

Declination in degrees

Examples

>>> qso coordinates 00 15 45.2 +22 01 34
RA  :  00:15:45.200 |   0.262556h |   3.938333d
DEC : +22:01:33.000 |  22.026111d |  22.026111d
Distance to dipole (259.5,  -61)      : 138.5192 degrees
Distance to anti-dipole (439.5,   61) :  41.4808 degrees
>>> qso coordinates 00:15:45.2 +22:01:34
RA  :  00:15:45.200 |   0.2626h |   3.9383d
DEC : +22:01:33.000 |  22.0261d |  22.0261d
Distance to dipole (259.5,  -61)      : 138.5192 degrees
Distance to anti-dipole (439.5,   61) :  41.4808 degrees

The arguments --xdipp and --ydipp can be used to customize the location of the dipole.

Spherical distance

qsotools. distance ( coord , ** kwargs ) [source]

Spherical distance between 2 coordinates

Parameters :
coord str

Coordinates of object. 3 formats are accepted, either copy/paste from SIMBAD with either colon or space separating the degree, minutes and seconds, or coordinates in decimal degrees are also accepted.

Examples

>>> qso distance 00:15:45.2 +22:01:34 00:18:45.2 +23:01:34
Object 1:
    RA  :  00:15:45.200 |   0.2626h |   3.9383d
    DEC : +22:01:33.000 |  22.0261d |  22.0261d
    Distance to dipole (259.5,  -61)      : 138.5192 degrees
    Distance to anti-dipole (439.5,   61) :  41.4808 degrees
Object 2:
    RA  :  00:18:45.200 |   0.3126h |   4.6883d
    DEC : +23:01:33.000 |  23.0261d |  23.0261d
    Distance to dipole (259.5,  -61)      : 141.4977 degrees
    Distance to anti-dipole (439.5,   61) :  38.5023 degrees
Spherical distance between the 2 given coordinates: 10.4370 degrees.

Cosmological calculator

qsotools. coscal ( z , ** kwargs ) [source]

Cosmological Calculator.

Parameters :
z float

Absorption redshift

Examples

>>> qso coscal 2.3
Hubble Distance................  4222.429 Mpc
Total LOS Comoving Distance....  5664.041 Mpc
Transverse Comoving Distance...  5664.041 Mpc
Angular Diameter Distance .....  1716.376 Mpc
Luminosity Distance............ 18691.335 Mpc
Distance Modulus...............    46.358
Lookback Time..................    10.759 Gyrs
Age of the Universe at z.......     3.039 Gyrs

Lyman-alpha wavelength edges

qsotools. edges ( z , v , ** kwargs ) [source]

Wavelength edges around given Lyman-alpha central redshift

Parameters :
z float

Central redshift of Lyman-alpha

v float

Velocity dispersion

Examples

>>> qso edges 2.3 70
A z = 2.3 HI Lyman-alpha system corresponds to lambda: 4011.71
The 70.0 km/s region around that line is: 4011.24 - 4012.18

D/H to Omega baryon conversion

qsotools. omegab ( dtoh , err , ** kwargs ) [source]

Get baryon density from D/H values

Parameters :
dtoh float

10^-5 D/H

err float

Uncertainty on D/H

References

Used calculations from Pettini & Cooke (2012) .

Examples

>>> qso omegab 2.535 0.05
10^-5 D/H = 2.535 +/- 0.050
Omega_b h^2 = 0.0223 +/- 0.0312