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
In [3]:
fg_file = resource_filename('frb', 'data/RM/opp14_foreground.fits')
In [4]:
hdu = fits.open(fg_file)
hdu.info()
In [5]:
rm_sky = hp.read_map(fg_file, hdu=4)
In [6]:
sig_sky = hp.read_map(fg_file, hdu=6)
In [7]:
hp.mollview(rm_sky, title="Mollview image RING")
hp.graticule()
In [8]:
repeater_coord = SkyCoord('05h31m58.698s +33d8m52.59s', frame='icrs')
In [14]:
RM, RM_err = rm.galactic_rm(repeater_coord)
RM, RM_err
Out[14]: