diff --git a/ugali/analysis/farm.py b/ugali/analysis/farm.py index 3073b9b..ddb6a8b 100755 --- a/ugali/analysis/farm.py +++ b/ugali/analysis/farm.py @@ -3,12 +3,10 @@ Dispatch the likelihood scan to a cluster. """ -import os,sys -from os.path import join, exists +import os +from os.path import join import shutil -import subprocess import time -import glob import numpy as np import healpy as hp @@ -17,9 +15,9 @@ import ugali.utils.skymap import ugali.utils.batch -from ugali.utils.projector import gal2cel,cel2gal -from ugali.utils.healpix import subpixel,superpixel,query_disc -from ugali.utils.healpix import pix2ang,ang2vec,read_partial_map +from ugali.utils.projector import gal2cel +from ugali.utils.healpix import query_disc +from ugali.utils.healpix import pix2ang,ang2vec from ugali.utils.logger import logger from ugali.utils.shell import mkdir diff --git a/ugali/analysis/imf.py b/ugali/analysis/imf.py index ba5491b..629a896 100644 --- a/ugali/analysis/imf.py +++ b/ugali/analysis/imf.py @@ -7,8 +7,6 @@ import numpy as np import scipy.interpolate -from ugali.utils.logger import logger - ############################################################ class IMF(object): diff --git a/ugali/analysis/kernel.py b/ugali/analysis/kernel.py index 02f8f09..3ad8852 100644 --- a/ugali/analysis/kernel.py +++ b/ugali/analysis/kernel.py @@ -3,8 +3,6 @@ Spatial kernels for dwarf galaxies. """ -import sys -import inspect from abc import abstractmethod from collections import OrderedDict as odict import copy @@ -14,10 +12,9 @@ import scipy.integrate import scipy.interpolate -import ugali.utils.projector from ugali.utils.projector import Projector, angsep from ugali.analysis.model import Model, Parameter -from ugali.utils.healpix import ang2vec, ang2pix, query_disc, ang2disc +from ugali.utils.healpix import ang2vec, ang2pix, ang2disc from ugali.utils.logger import logger diff --git a/ugali/analysis/loglike.py b/ugali/analysis/loglike.py index cf4396c..adb6233 100644 --- a/ugali/analysis/loglike.py +++ b/ugali/analysis/loglike.py @@ -3,12 +3,9 @@ Implementation of the (log) likelihood function. """ from collections import OrderedDict as odict -import copy import time -import numpy import numpy as np -from scipy.stats import norm import healpy as hp import fitsio @@ -16,15 +13,13 @@ import ugali.utils.binning import ugali.utils.parabola -from ugali.utils.projector import angsep, gal2cel +from ugali.utils.projector import angsep from ugali.utils.healpix import ang2pix,pix2ang,ang2disc from ugali.utils.logger import logger from ugali.utils.config import Config from ugali.analysis.source import Source -from ugali.analysis.kernel import EllipticalDisk, ToyKernel - class Observation(object): """ Dummy class for storing catalog, roi, mask and other quantities diff --git a/ugali/analysis/results.py b/ugali/analysis/results.py index 1f4425e..6287ca1 100644 --- a/ugali/analysis/results.py +++ b/ugali/analysis/results.py @@ -7,9 +7,7 @@ import numpy as np import yaml -import numpy.lib.recfunctions as recfuncs -import astropy.coordinates from astropy.coordinates import SkyCoord import astropy.units as u @@ -20,7 +18,7 @@ from ugali.utils.stats import Samples from ugali.utils.projector import dist2mod,mod2dist from ugali.utils.projector import cel2gal,gal2cel,gal2cel_angle -from ugali.utils.projector import ang2const, ang2iau +from ugali.utils.projector import ang2const from ugali.utils.config import Config from ugali.utils.logger import logger diff --git a/ugali/analysis/scan.py b/ugali/analysis/scan.py index e3dca85..9787d0b 100755 --- a/ugali/analysis/scan.py +++ b/ugali/analysis/scan.py @@ -2,25 +2,21 @@ """ Create and run an individual likelihood analysis. """ -import os -import sys + from collections import OrderedDict as odict -import numpy import numpy as np -import healpy import fitsio import ugali.utils.skymap import ugali.analysis.loglike from ugali.analysis.loglike import LogLikelihood, createSource, createObservation -from ugali.analysis.source import Source from ugali.utils.parabola import Parabola from ugali.utils.batch import LSF from ugali.utils.config import Config from ugali.utils.logger import logger -from ugali.utils.healpix import superpixel, subpixel, pix2ang, ang2pix +from ugali.utils.healpix import ang2pix from ugali.utils.healpix import write_partial_map ############################################################ diff --git a/ugali/analysis/search.py b/ugali/analysis/search.py index 85b12a0..2a88feb 100644 --- a/ugali/analysis/search.py +++ b/ugali/analysis/search.py @@ -4,19 +4,16 @@ """ import os -import copy -import subprocess from collections import OrderedDict as odict import glob import healpy import fitsio import numpy as np -import numpy import numpy.lib.recfunctions as recfuncs import scipy.ndimage as ndimage -from ugali.utils.shell import mkdir, which +from ugali.utils.shell import mkdir from ugali.utils.logger import logger from ugali.utils.binning import reverseHistogram from ugali.utils.projector import Projector,gal2cel,cel2gal,ang2iau,mod2dist diff --git a/ugali/candidate/associate.py b/ugali/candidate/associate.py index 1667ee8..501c25e 100644 --- a/ugali/candidate/associate.py +++ b/ugali/candidate/associate.py @@ -1,18 +1,15 @@ #!/usr/bin/env python import os,sys -from os.path import join,abspath,split import inspect from collections import OrderedDict as odict import numpy as np -from numpy.lib.recfunctions import stack_arrays import fitsio import ugali.utils.projector from ugali.utils.projector import gal2cel, cel2gal import ugali.utils.idl -from ugali.utils.healpix import ang2pix -from ugali.utils.shell import get_ugali_dir, get_cat_dir +from ugali.utils.shell import get_cat_dir from ugali.utils.logger import logger #class Catalog(np.recarray): diff --git a/ugali/isochrone/composite.py b/ugali/isochrone/composite.py index e5c02f9..582fc7c 100644 --- a/ugali/isochrone/composite.py +++ b/ugali/isochrone/composite.py @@ -4,15 +4,12 @@ """ __author__ = "Alex Drlica-Wagner" -import sys -import os from collections import OrderedDict as odict from functools import wraps import numpy as np -from ugali.analysis.model import Model, Parameter -from ugali.utils.logger import logger +from ugali.analysis.model import Parameter from ugali.isochrone.model import IsochroneModel, Isochrone from ugali.isochrone.mesa import Dotter2016 from ugali.isochrone.parsec import Marigo2017 diff --git a/ugali/isochrone/dartmouth.py b/ugali/isochrone/dartmouth.py index 944cbf9..91b7ab7 100644 --- a/ugali/isochrone/dartmouth.py +++ b/ugali/isochrone/dartmouth.py @@ -4,12 +4,9 @@ http://stellar.dartmouth.edu/models/isolf_new.php """ import os -import sys -import glob import copy from collections import OrderedDict as odict -import re try: from urllib.parse import urlencode from urllib.request import urlopen @@ -17,7 +14,6 @@ from urllib import urlencode from urllib2 import urlopen -import tempfile import subprocess from collections import OrderedDict as odict diff --git a/ugali/isochrone/empirical.py b/ugali/isochrone/empirical.py index b309a13..faaf4c3 100644 --- a/ugali/isochrone/empirical.py +++ b/ugali/isochrone/empirical.py @@ -5,8 +5,8 @@ import os from collections import OrderedDict as odict -from ugali.analysis.model import Model, Parameter -from ugali.utils.shell import mkdir, get_ugali_dir, get_iso_dir +from ugali.analysis.model import Parameter +from ugali.utils.shell import get_iso_dir from ugali.isochrone.parsec import PadovaIsochrone class EmpiricalPadova(PadovaIsochrone): diff --git a/ugali/isochrone/mesa.py b/ugali/isochrone/mesa.py index 0b05fed..4be0e31 100644 --- a/ugali/isochrone/mesa.py +++ b/ugali/isochrone/mesa.py @@ -4,8 +4,6 @@ http://waps.cfa.harvard.edu/MIST/iso_form.php """ import os -import sys -import glob import copy import tempfile import subprocess diff --git a/ugali/isochrone/model.py b/ugali/isochrone/model.py index d673934..28ac199 100644 --- a/ugali/isochrone/model.py +++ b/ugali/isochrone/model.py @@ -28,14 +28,10 @@ # FIXME: Need to vectorize CMD and MMD calculation -import sys import os -from abc import abstractmethod import collections from collections import OrderedDict as odict -import inspect import glob -from functools import wraps import numpy as np import scipy.interpolate @@ -46,10 +42,9 @@ import ugali.analysis.imf from ugali.analysis.model import Model, Parameter from ugali.utils.stats import norm_cdf -from ugali.utils.shell import mkdir, get_ugali_dir, get_iso_dir +from ugali.utils.shell import mkdir, get_iso_dir from ugali.utils.projector import mod2dist -from ugali.utils.config import Config from ugali.utils.logger import logger ############################################################ diff --git a/ugali/isochrone/padova.py b/ugali/isochrone/padova.py index b6236c3..5447101 100644 --- a/ugali/isochrone/padova.py +++ b/ugali/isochrone/padova.py @@ -9,8 +9,7 @@ import numpy as np -from ugali.analysis.model import Model, Parameter -from ugali.utils.shell import mkdir, get_ugali_dir, get_iso_dir +from ugali.utils.shell import get_iso_dir from ugali.isochrone.model import Isochrone from ugali.isochrone.parsec import Marigo2017 as Padova from ugali.isochrone.parsec import defaults_27 diff --git a/ugali/isochrone/parsec.py b/ugali/isochrone/parsec.py index af99f24..2abc1c0 100644 --- a/ugali/isochrone/parsec.py +++ b/ugali/isochrone/parsec.py @@ -3,8 +3,6 @@ http://stev.oapd.inaf.it """ import os -import sys -import glob import copy from collections import OrderedDict as odict @@ -21,7 +19,6 @@ import re import numpy as np -import scipy.spatial from ugali.utils.logger import logger from ugali.isochrone.model import Isochrone diff --git a/ugali/observation/catalog.py b/ugali/observation/catalog.py index 7e3ad80..5a563d7 100644 --- a/ugali/observation/catalog.py +++ b/ugali/observation/catalog.py @@ -9,7 +9,7 @@ from ugali.utils.config import Config from ugali.utils.projector import gal2cel,cel2gal -from ugali.utils.healpix import ang2pix,superpixel +from ugali.utils.healpix import ang2pix from ugali.utils.logger import logger from ugali.utils.fileio import load_infiles from ugali.utils import mlab diff --git a/ugali/observation/mask.py b/ugali/observation/mask.py index 611f5ff..75be510 100644 --- a/ugali/observation/mask.py +++ b/ugali/observation/mask.py @@ -8,7 +8,6 @@ someFunction """ -import os import numpy as np import healpy as hp import scipy.signal @@ -20,7 +19,6 @@ from ugali.utils import healpix from ugali.utils.logger import logger -from ugali.utils.healpix import ang2pix from ugali.utils.config import Config from ugali.utils.constants import MAGERR_PARAMS ############################################################ diff --git a/ugali/pipeline/run_01.0_download_data.py b/ugali/pipeline/run_01.0_download_data.py index 013a298..3c377dc 100755 --- a/ugali/pipeline/run_01.0_download_data.py +++ b/ugali/pipeline/run_01.0_download_data.py @@ -3,7 +3,6 @@ from os.path import join from ugali.analysis.pipeline import Pipeline -from ugali.preprocess.database import databaseFactory from ugali.utils.shell import mkdir #components = ['data','isochrone'] diff --git a/ugali/pipeline/run_03.0_likelihood.py b/ugali/pipeline/run_03.0_likelihood.py index 895963e..71afedd 100755 --- a/ugali/pipeline/run_03.0_likelihood.py +++ b/ugali/pipeline/run_03.0_likelihood.py @@ -2,9 +2,7 @@ """Run the likelihood search.""" import glob import os -from os.path import join, exists, basename - -import numpy as np +from os.path import join, exists from ugali.analysis.farm import Farm from ugali.analysis.pipeline import Pipeline diff --git a/ugali/pipeline/run_04.0_peak_finder.py b/ugali/pipeline/run_04.0_peak_finder.py index 17cc593..19b40e2 100755 --- a/ugali/pipeline/run_04.0_peak_finder.py +++ b/ugali/pipeline/run_04.0_peak_finder.py @@ -1,15 +1,13 @@ #!/usr/bin/env python """Perform object finding and association.""" -import os, glob +import os from os.path import exists, join import time import fitsio -import numpy as np from ugali.analysis.pipeline import Pipeline from ugali.analysis.search import CandidateSearch -import ugali.candidate.associate from ugali.utils.logger import logger from ugali.utils.shell import mkdir diff --git a/ugali/pipeline/run_05.0_followup.py b/ugali/pipeline/run_05.0_followup.py index 59e7e94..5da6e4b 100755 --- a/ugali/pipeline/run_05.0_followup.py +++ b/ugali/pipeline/run_05.0_followup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python """Perform MCMC follow-up fitting.""" -import os from os.path import join,exists,basename,splitext import shutil from collections import OrderedDict as odict @@ -12,13 +11,10 @@ #try: os.environ['DISPLAY'] #except KeyError: matplotlib.use('Agg') -import numpy -import numpy as np import yaml import fitsio from ugali.analysis.pipeline import Pipeline -from ugali.analysis.scan import Scan import ugali.analysis.source import ugali.analysis.loglike import ugali.analysis.results diff --git a/ugali/pipeline/run_06.0_simulate.py b/ugali/pipeline/run_06.0_simulate.py index ab7c88d..9a6a852 100755 --- a/ugali/pipeline/run_06.0_simulate.py +++ b/ugali/pipeline/run_06.0_simulate.py @@ -9,7 +9,6 @@ import shutil import numpy as np -import numpy.lib.recfunctions as recfuncs import fitsio from ugali.analysis.pipeline import Pipeline @@ -19,7 +18,6 @@ from ugali.utils.shell import mkdir from ugali.utils.logger import logger -from ugali.utils.healpix import pix2ang #components = ['simulate','analyze','merge','plot'] components = ['analyze','merge'] diff --git a/ugali/preprocess/database.py b/ugali/preprocess/database.py index 7894aaf..20e5914 100755 --- a/ugali/preprocess/database.py +++ b/ugali/preprocess/database.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import os, sys +import os import re import io import subprocess diff --git a/ugali/preprocess/maglims.py b/ugali/preprocess/maglims.py index 0b1b245..a1da727 100644 --- a/ugali/preprocess/maglims.py +++ b/ugali/preprocess/maglims.py @@ -4,7 +4,6 @@ """ import os from os.path import join -import shutil import tempfile import subprocess from collections import Counter @@ -14,12 +13,10 @@ import numpy as np import numpy.lib.recfunctions as recfuncs import healpy as hp -from scipy.interpolate import interp1d -from scipy.optimize import brentq import ugali.utils.skymap import ugali.utils.binning -from ugali.utils.projector import cel2gal, gal2cel +from ugali.utils.projector import gal2cel from ugali.utils.healpix import ang2pix, pix2ang, superpixel, read_map from ugali.utils.shell import mkdir from ugali.utils.logger import logger diff --git a/ugali/preprocess/mangle.py b/ugali/preprocess/mangle.py index 7d7c58c..cd113d7 100644 --- a/ugali/preprocess/mangle.py +++ b/ugali/preprocess/mangle.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import os, sys -from os.path import splitext, exists import subprocess def fits2ply(infile,outfile=None): diff --git a/ugali/preprocess/pixelize.py b/ugali/preprocess/pixelize.py index c367750..5f4fedb 100644 --- a/ugali/preprocess/pixelize.py +++ b/ugali/preprocess/pixelize.py @@ -6,25 +6,21 @@ #FIXME: ADW This needs to be updated to use fitsio import os -from os.path import join -import glob import collections import fitsio import numpy as np -import numpy.lib.recfunctions as recfuncs import healpy as hp #import ugali.utils.binning #import ugali.utils.skymap from ugali.utils.projector import cel2gal, gal2cel from ugali.utils import healpix, mlab -from ugali.utils.healpix import ang2pix, pix2ang, superpixel +from ugali.utils.healpix import ang2pix from ugali.utils.shell import mkdir from ugali.utils.logger import logger -from ugali.utils.config import Config -import ugali.utils.fileio + def pixelizeCatalog(infiles, config, force=False): """ diff --git a/ugali/scratch/PlotDistancePanels.py b/ugali/scratch/PlotDistancePanels.py index 930b43f..4452244 100644 --- a/ugali/scratch/PlotDistancePanels.py +++ b/ugali/scratch/PlotDistancePanels.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -import sys -import numpy as np import pylab as plt from ugali.analysis.pipeline import Pipeline diff --git a/ugali/scratch/PlotSDSSImage.py b/ugali/scratch/PlotSDSSImage.py index 6c53377..ce2962b 100644 --- a/ugali/scratch/PlotSDSSImage.py +++ b/ugali/scratch/PlotSDSSImage.py @@ -1,13 +1,9 @@ #!/usr/bin/env python -import sys - -import numpy as np import pylab as plt from ugali.analysis.pipeline import Pipeline import ugali.utils.plotting -from ugali.utils.logger import logger description="Plot distance modulus panels" components = [] diff --git a/ugali/scratch/PlotTargetAnalysis.py b/ugali/scratch/PlotTargetAnalysis.py index da74cbb..d89b75d 100644 --- a/ugali/scratch/PlotTargetAnalysis.py +++ b/ugali/scratch/PlotTargetAnalysis.py @@ -1,7 +1,5 @@ #!/usr/bin/env python import os -import glob -import matplotlib import healpy import pylab as plt import numpy diff --git a/ugali/scratch/PlotTargetResults.py b/ugali/scratch/PlotTargetResults.py index 35becb5..6d4319e 100644 --- a/ugali/scratch/PlotTargetResults.py +++ b/ugali/scratch/PlotTargetResults.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import matplotlib import healpy import pylab as plt diff --git a/ugali/scratch/TargetResults.py b/ugali/scratch/TargetResults.py index 48adaa7..12f3716 100644 --- a/ugali/scratch/TargetResults.py +++ b/ugali/scratch/TargetResults.py @@ -1,11 +1,8 @@ #!/usr/bin/env python import os -import healpy -import pylab as plt import numpy import astropy.io.fits as pyfits -import copy import ugali.utils.skymap import ugali.utils.projector diff --git a/ugali/scratch/download_isochrones.py b/ugali/scratch/download_isochrones.py index 2c0f573..2e738ab 100755 --- a/ugali/scratch/download_isochrones.py +++ b/ugali/scratch/download_isochrones.py @@ -4,16 +4,11 @@ """ __author__ = "Alex Drlica-Wagner" import os -import re -import subprocess from multiprocessing import Pool -from collections import OrderedDict as odict -import copy import numpy as np from ugali.utils.logger import logger -from ugali.utils.shell import mkdir from ugali.isochrone import factory as isochrone_factory if __name__ == "__main__": diff --git a/ugali/scratch/lnlscan.py b/ugali/scratch/lnlscan.py index 414b40f..0ea2919 100644 --- a/ugali/scratch/lnlscan.py +++ b/ugali/scratch/lnlscan.py @@ -1,30 +1,19 @@ #!/usr/bin/env python -import yaml import numpy as np -from os.path import join import matplotlib, os try: os.environ['DISPLAY'] except KeyError: matplotlib.use('Agg') -from matplotlib import font_manager import pylab as plt from ugali.utils.shell import mkdir import ugali.analysis.loglike -from ugali.utils.projector import cel2gal, gal2cel import ugali.utils.plotting -from ugali.utils.config import Config -from ugali.analysis.kernel import Disk -from ugali.isochrone import Padova import ugali.analysis.source from dsphs.like.lnlfn import ProfileLimit -from mpl_toolkits.axes_grid1 import make_axes_locatable -from matplotlib.ticker import MaxNLocator -from matplotlib import patches -import mpl_toolkits.axes_grid1.axes_divider as axes_divider from collections import OrderedDict as odict #def scan(loglike,xdict,ydict): diff --git a/ugali/scratch/position_angle.py b/ugali/scratch/position_angle.py index dc6ec58..4b8efcf 100644 --- a/ugali/scratch/position_angle.py +++ b/ugali/scratch/position_angle.py @@ -6,7 +6,6 @@ import matplotlib.patheffects as patheffects import numpy as np -import fitsio import astropy.io.fits as pyfits from astropy.coordinates import SkyCoord diff --git a/ugali/scratch/simulation/assemble.py b/ugali/scratch/simulation/assemble.py index 7192b89..7470981 100644 --- a/ugali/scratch/simulation/assemble.py +++ b/ugali/scratch/simulation/assemble.py @@ -1,6 +1,5 @@ DeprecationWarning("'assemble.py' should be removed") -import sys import os import shutil import yaml diff --git a/ugali/scratch/simulation/simulate_population.py b/ugali/scratch/simulation/simulate_population.py index a64623b..ea27dee 100755 --- a/ugali/scratch/simulation/simulate_population.py +++ b/ugali/scratch/simulation/simulate_population.py @@ -3,14 +3,11 @@ Currently this is more set up as a standalone script. """ import os -import copy -import collections from collections import OrderedDict as odict import yaml import numpy as np import scipy.interpolate import healpy as hp -import fitsio import astropy.io.fits as pyfits import ugali.utils.projector diff --git a/ugali/scratch/simulation/survey_selection_function.py b/ugali/scratch/simulation/survey_selection_function.py index eff06da..6800fb3 100644 --- a/ugali/scratch/simulation/survey_selection_function.py +++ b/ugali/scratch/simulation/survey_selection_function.py @@ -13,7 +13,6 @@ import matplotlib.pyplot as plt import pylab -import sklearn from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV diff --git a/ugali/scratch/simulation/validate_sim_population.py b/ugali/scratch/simulation/validate_sim_population.py index 038ef96..0af3ea6 100644 --- a/ugali/scratch/simulation/validate_sim_population.py +++ b/ugali/scratch/simulation/validate_sim_population.py @@ -2,7 +2,6 @@ import glob import numpy as np import astropy.io.fits as pyfits -import matplotlib.patches as patches import pylab pylab.ion() diff --git a/ugali/simulation/analyzer.py b/ugali/simulation/analyzer.py index a18b4d0..7e2e92f 100755 --- a/ugali/simulation/analyzer.py +++ b/ugali/simulation/analyzer.py @@ -3,16 +3,12 @@ Analyze a simulated data set. """ __author__ = "Alex Drlica-Wagner" -import copy import os import time import resource, psutil from collections import OrderedDict as odict -import numpy import numpy as np -import scipy.interpolate -import healpy import numpy.lib.recfunctions as recfuncs import fitsio @@ -23,8 +19,6 @@ import ugali.utils.stats import ugali.analysis.scan -from ugali.utils.projector import gal2cel, cel2gal, sr2deg, mod2dist -from ugali.utils.healpix import ang2pix, pix2ang from ugali.utils.logger import logger from ugali.utils.config import Config from ugali.utils import mlab diff --git a/ugali/simulation/population.py b/ugali/simulation/population.py index 1e8a9b4..affc6e5 100644 --- a/ugali/simulation/population.py +++ b/ugali/simulation/population.py @@ -1,9 +1,7 @@ """ Tool to generate a population of simulated satellite properties. """ -from collections import OrderedDict as odict import numpy as np -import pylab import pandas as pd import ugali.utils.config diff --git a/ugali/simulation/simulator.py b/ugali/simulation/simulator.py index 71d0da7..a822025 100755 --- a/ugali/simulation/simulator.py +++ b/ugali/simulation/simulator.py @@ -3,7 +3,6 @@ Module for simulation. """ -import copy import os import numpy as np @@ -20,7 +19,7 @@ import ugali.utils.stats import ugali.analysis.scan -from ugali.utils.projector import gal2cel, cel2gal, sr2deg, mod2dist +from ugali.utils.projector import mod2dist from ugali.utils.healpix import ang2pix, pix2ang from ugali.utils.logger import logger from ugali.utils.config import Config diff --git a/ugali/utils/batch.py b/ugali/utils/batch.py index 371c240..186fbb8 100644 --- a/ugali/utils/batch.py +++ b/ugali/utils/batch.py @@ -3,7 +3,7 @@ Cross-platform batch computing interface. """ import os -import subprocess, subprocess as sub +import subprocess as sub import getpass from collections import OrderedDict as odict from itertools import chain @@ -11,8 +11,6 @@ import time import resource -import numpy as np - from ugali.utils.logger import logger GB=1024**3 diff --git a/ugali/utils/fileio.py b/ugali/utils/fileio.py index b62bd6b..9400641 100644 --- a/ugali/utils/fileio.py +++ b/ugali/utils/fileio.py @@ -4,18 +4,12 @@ """ __author__ = "Alex Drlica-Wagner" -import shutil import os -from collections import OrderedDict as odict -import itertools -import warnings import fitsio import numpy as np -import healpy as hp from ugali.utils.logger import logger -import warnings from ugali.utils.mlab import isstring def read(filename,**kwargs): diff --git a/ugali/utils/plotting.py b/ugali/utils/plotting.py index c289bf3..8ccc0a1 100644 --- a/ugali/utils/plotting.py +++ b/ugali/utils/plotting.py @@ -17,7 +17,7 @@ import scipy.ndimage as nd import scipy.misc -from mpl_toolkits.axes_grid1 import AxesGrid,Grid,ImageGrid, make_axes_locatable +from mpl_toolkits.axes_grid1 import AxesGrid, make_axes_locatable from matplotlib.ticker import MaxNLocator import mpl_toolkits.axes_grid1.axes_divider as axes_divider @@ -30,7 +30,6 @@ import ugali.isochrone import ugali.analysis.loglike -from ugali.utils import fileio from ugali.utils.healpix import ang2pix, get_nside from ugali.utils.projector import mod2dist,gal2cel,cel2gal from ugali.utils.projector import sphere2image,image2sphere diff --git a/ugali/utils/stats.py b/ugali/utils/stats.py index d66f5e2..9240c20 100644 --- a/ugali/utils/stats.py +++ b/ugali/utils/stats.py @@ -12,7 +12,6 @@ import scipy.stats # These should probably live in this file -from ugali.utils.bayesian_efficiency import bayesianInterval, binomialInterval from ugali.utils import mlab _alpha = 0.32