Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frb/dlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from __future__ import print_function, absolute_import, division, unicode_literals

import numpy as np
import pdb

from scipy.interpolate import interp1d

Expand Down
3 changes: 0 additions & 3 deletions frb/dm_kde/dm_frb_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
import numpy as np
import scipy as sp
import pandas as pd
from pandas import DataFrame as df
from scipy.stats import lognorm
from scipy.signal import argrelextrema
from pdf_fns import make_kde_funtion, make_pdf, rv_amount
import matplotlib
import matplotlib.pyplot as plt
from astropy import units
import random
import logging
Expand Down
2 changes: 0 additions & 2 deletions frb/dm_kde/pdf_fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import numpy as np
import scipy as sp
import pandas as pd
import sklearn
from sklearn.model_selection import GridSearchCV
from sklearn.neighbors import KernelDensity

Expand Down
2 changes: 1 addition & 1 deletion frb/dm_kde/sort_transient_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" Module to correct pulsar and FRB DMs for the MW ISM """

from ne2001 import ne_io, density #ne2001 ism model
from ne2001 import density #ne2001 ism model
import pygedm #ymw ism model
import numpy as np
import pandas as pd
Expand Down
2 changes: 0 additions & 2 deletions frb/dm_kde/transient_kdes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

from asymmetric_kde import ProperGammaEstimator
from pdf_fns import make_kde_funtion
from data import FRBs
import numpy as np
import pandas as pd
from scipy.signal import argrelextrema
from astropy.stats import bootstrap
from astropy.utils import NumpyRNGContext
Expand Down
5 changes: 2 additions & 3 deletions frb/figures/finder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" Module for generating a finder chart """
import os

import numpy as np

from IPython import embed
Expand All @@ -8,7 +8,6 @@
from matplotlib import font_manager
import matplotlib.cm as cm

from PIL import Image

from astropy import units
from astropy.visualization.wcsaxes import SphericalCircle
Expand All @@ -26,7 +25,7 @@
from frb.surveys import images

try:
from photutils import SkyRectangularAperture
from photutils.aperture import SkyRectangularAperture
except ImportError:
flag_photu = False
print('Install the photutils package to be able to add a slit to an image')
Expand Down
5 changes: 0 additions & 5 deletions frb/frb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
""" Module for an FRB event
"""
import inspect
from importlib import resources

import importlib_resources
import os
Expand All @@ -21,10 +20,6 @@
from frb import mw
from frb import defs
from frb.galaxies import frbgalaxy

from IPython import embed


class GenericFRB(object):
"""
Parent object for FRBs
Expand Down
4 changes: 0 additions & 4 deletions frb/frb_surveys/chime.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
""" CHIME/FRB calculations """
import os
from astropy.io import ascii
import numpy as np
import matplotlib.pyplot as plt

Expand All @@ -18,8 +16,6 @@
#import dustmaps.sfd
#dustmaps.sfd.fetch()

from IPython import embed

def check_frb_mr(outfile:str='mr_pdf.png',
pdf_file:str=None):
""" Generate a plot of the host galaxy M_r PDF
Expand Down
2 changes: 1 addition & 1 deletion frb/galaxies/cigale.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
print("You will need to install pcigale to use the cigale.py module")
else:
from pcigale.analysis_modules import get_module
from pcigale.utils.console import INFO, WARNING, ERROR, console
from pcigale.utils.console import WARNING, ERROR, console

from frb.surveys.catalog_utils import _detect_mag_cols, convert_mags_to_flux

Expand Down
1 change: 0 additions & 1 deletion frb/galaxies/eazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from frb.surveys import catalog_utils
from frb import defs

from IPython import embed

# Necessary because people might not execute eazy from src
# but might have a copy in bin or some other location.
Expand Down
1 change: 0 additions & 1 deletion frb/galaxies/extra_data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
""" Methods to load up additional data """

import importlib_resources
import os

import pandas

Expand Down
3 changes: 0 additions & 3 deletions frb/galaxies/frbgalaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import numpy as np
import os
import warnings
import glob


import importlib_resources
Expand All @@ -25,8 +24,6 @@

from scipy.integrate import simpson

from IPython import embed

class FRBGalaxy(object):
"""
Parent class for galaxies in FRB fields
Expand Down
2 changes: 1 addition & 1 deletion frb/galaxies/galfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""

import numpy as np
import sys, os, subprocess
import os
import warnings

from astropy.io import fits
Expand Down
3 changes: 0 additions & 3 deletions frb/galaxies/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
Warning: Might get chopped up into pieces sommeday
"""
import numpy as np
import pdb

import os
import pandas

from astropy import units
Expand Down
5 changes: 0 additions & 5 deletions frb/galaxies/mag_dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@

#import healpy as hp

from cycler import cycler

from matplotlib import pyplot as plt
import matplotlib.gridspec as gridspec

from astropy.coordinates import Distance
from linetools.scripts.utils import coord_arg_to_coord

from frb.frb import FRB, build_table_of_frbs, list_of_frbs
from frb.figures import utils as frb_fig_u
from frb.galaxies import utils as frb_gal_u

from IPython import embed


def r_vs_dm_figure(z_min, z_max, z, PzDM, outfile='fig_r_vs_z.png',
Expand Down
1 change: 0 additions & 1 deletion frb/galaxies/nebular.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
except ImportError:
warnings.warn("Galaxy nebular line analysis requires dust_extionction. Install it if you want to use them")

from IPython import embed

try:
from linetools.lists import linelist
Expand Down
1 change: 0 additions & 1 deletion frb/galaxies/offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from astropy import units
from astropy.coordinates import SkyCoord

from IPython import embed

def angular_offset(frb, galaxy, nsigma=5., nsamp=2000,
gal_sig=None):
Expand Down
5 changes: 2 additions & 3 deletions frb/galaxies/photom.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@

from IPython import embed

from astropy.io import fits
from astropy.table import Table, hstack, vstack, join
from astropy.table import Table, hstack, vstack
from astropy.coordinates import SkyCoord
from astropy.coordinates import match_coordinates_sky
from astropy import units
from astropy.wcs import utils as wcs_utils
from astropy.nddata import Cutout2D

from astropy.wcs import WCS
from astropy import stats

Expand Down
5 changes: 1 addition & 4 deletions frb/galaxies/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import os
import glob
from IPython import embed

import importlib_resources
import numpy as np
from scipy.interpolate import interp1d
import warnings


import pandas

Expand All @@ -19,7 +17,6 @@
flg_specdb = True

from astropy.coordinates import SkyCoord
from astropy import units

import pandas as pd

Expand Down
2 changes: 0 additions & 2 deletions frb/halos/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

from frb.defs import frb_cosmo as cosmo

from IPython import embed

# Speed up calculations
m_p = constants.m_p.cgs.value # g

Expand Down
3 changes: 0 additions & 3 deletions frb/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import importlib_resources
import gzip
import json
import os



def load_dla_fits():
dla_fit_file = str(importlib_resources.files('frb.data.IGM')/'dla_fits.json')
Expand Down
4 changes: 0 additions & 4 deletions frb/mw.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
"""
from __future__ import print_function, absolute_import, division, unicode_literals

import os
import numpy as np

from astropy import units
import warnings

from frb.halos.models import ModifiedNFW

from ne2001 import density
Expand Down
1 change: 0 additions & 1 deletion frb/scripts/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""
from __future__ import (print_function, absolute_import, division, unicode_literals)

from IPython import embed

def parser(options=None):
import argparse
Expand Down
1 change: 0 additions & 1 deletion frb/scripts/iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import pandas
from scipy.optimize import minimize
# to hold one of these parameters constant, just remove it from the arg set here
from zdm import cosmology as cos
from scipy.stats import poisson
# internal counter
NCF=0
Expand Down
9 changes: 0 additions & 9 deletions frb/scripts/pz_given_dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
# It should be possible to remove all the matplotlib calls from this
# but in the current implementation it is not removed.
import argparse
import imp
import numpy as np
import os

from zdm import iteration as it
from zdm import io
from zdm.craco import loading

from IPython import embed

def main(pargs):

Expand Down
2 changes: 0 additions & 2 deletions frb/scripts/pzdm_mag.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
as well as the limiting magnitude for the host galaxy
Defaults to using a perfect telescope model for the DM-z grid
"""
from IPython import embed


def parser(options=None):
import argparse
Expand Down
2 changes: 0 additions & 2 deletions frb/scripts/pzdm_mag_crossmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
as well as the limiting magnitude for the host galaxy
Defaults to using a perfect telescope model for the DM-z grid
"""
from IPython import embed


def parser(options=None):
import argparse
Expand Down
19 changes: 0 additions & 19 deletions frb/scripts/r_vs_dm.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,18 @@
""" Estimate magnitude range for a host FRB given DM """

import numpy as np
import glob, os, sys, json
import pdb

from scipy.interpolate import interp1d

#import healpy as hp

from cycler import cycler
import matplotlib as mpl
import seaborn as sns

import pandas

from matplotlib import pyplot as plt
import matplotlib.gridspec as gridspec

from astropy.coordinates import Distance
from astropy import visualization as vis
from astropy.coordinates import SkyCoord

from linetools import utils as ltu
from linetools.scripts.utils import coord_arg_to_coord

from frb.frb import FRB, build_table_of_frbs, list_of_frbs
from frb.figures import utils as frb_fig_u
from frb.figures import dm as frb_fig_dm
from frb.galaxies import utils as frb_gal_u
from frb import mw
from frb.dm import prob_dmz, igm

from IPython import embed

# user parameters
FRB = 'FRB20240304'
Expand Down
4 changes: 2 additions & 2 deletions frb/scripts/random_assoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from astropy import units as u
from astropy.table import Table
from matplotlib import pyplot as plt
import pdb

from frb.surveys import des
import sys,os

import progressbar as pb #pip install progressbar2
from matplotlib import pyplot as plt
import seaborn as sns
Expand Down
2 changes: 0 additions & 2 deletions frb/scripts/sightline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""
Script to print a summary of a given FRB to the terminal
"""
from IPython import embed

def parser(options=None):
import argparse
Expand All @@ -22,7 +21,6 @@ def parser(options=None):
def main(pargs):
""" Run
"""
import json

from linetools import utils as ltu
from linetools.scripts.utils import coord_arg_to_coord
Expand Down
Loading