Assessing Galactic RM from the Oppermann+14 map


In [1]:
%matplotlib inline

In [12]:
# imports
from pkg_resources import resource_filename
import numpy as np

from astropy.io import fits
from astropy.coordinates import SkyCoord

import healpy as hp

from frb import rm

Load map


In [3]:
fg_file = resource_filename('frb', 'data/RM/opp14_foreground.fits')

In [4]:
hdu = fits.open(fg_file)
hdu.info()


Filename: /data/Projects/FRB/frb/data/RM/opp14_foreground.fits
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU       6   ()      
  1  angspec       1 BinTableHDU     12   384R x 1C   [D]   
  2  profile       1 BinTableHDU     17   196608R x 1C   [E]   
  3  maps/s        1 BinTableHDU     17   196608R x 1C   [E]   
  4  maps/phi      1 BinTableHDU     17   196608R x 1C   [E]   
  5  uncertainty/s    1 BinTableHDU     17   196608R x 1C   [E]   
  6  uncertainty/phi    1 BinTableHDU     17   196608R x 1C   [E]   

In [5]:
rm_sky = hp.read_map(fg_file, hdu=4)


NSIDE = 128
ORDERING = RING in fits file
INDXSCHM = IMPLICIT

In [6]:
sig_sky = hp.read_map(fg_file, hdu=6)


NSIDE = 128
ORDERING = RING in fits file
INDXSCHM = IMPLICIT

HealPix time

View


In [7]:
hp.mollview(rm_sky, title="Mollview image RING")
hp.graticule()


0.0 180.0 -180.0 180.0
The interval between parallels is 30 deg -0.00'.
The interval between meridians is 30 deg -0.00'.

Galactic RM

Query a Coordinate


In [8]:
repeater_coord = SkyCoord('05h31m58.698s +33d8m52.59s', frame='icrs')

In [14]:
RM, RM_err = rm.galactic_rm(repeater_coord)
RM, RM_err


NSIDE = 128
ORDERING = RING in fits file
INDXSCHM = IMPLICIT
NSIDE = 128
ORDERING = RING in fits file
INDXSCHM = IMPLICIT
Out[14]:
(<Quantity -17.72799492 rad / m2>, <Quantity 76.43039703 rad / m2>)