Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused modules #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 5 additions & 7 deletions ugali/analysis/farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 0 additions & 2 deletions ugali/analysis/imf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import numpy as np
import scipy.interpolate

from ugali.utils.logger import logger

############################################################

class IMF(object):
Expand Down
5 changes: 1 addition & 4 deletions ugali/analysis/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
7 changes: 1 addition & 6 deletions ugali/analysis/loglike.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,23 @@
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

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
Expand Down
4 changes: 1 addition & 3 deletions ugali/analysis/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
8 changes: 2 additions & 6 deletions ugali/analysis/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

############################################################
Expand Down
5 changes: 1 addition & 4 deletions ugali/analysis/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions ugali/candidate/associate.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
5 changes: 1 addition & 4 deletions ugali/isochrone/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions ugali/isochrone/dartmouth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
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
except ImportError:
from urllib import urlencode
from urllib2 import urlopen

import tempfile
import subprocess
from collections import OrderedDict as odict

Expand Down
4 changes: 2 additions & 2 deletions ugali/isochrone/empirical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions ugali/isochrone/mesa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions ugali/isochrone/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

############################################################
Expand Down
3 changes: 1 addition & 2 deletions ugali/isochrone/padova.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions ugali/isochrone/parsec.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
http://stev.oapd.inaf.it
"""
import os
import sys
import glob
import copy
from collections import OrderedDict as odict

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ugali/observation/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions ugali/observation/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
someFunction
"""

import os
import numpy as np
import healpy as hp
import scipy.signal
Expand All @@ -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
############################################################
Expand Down
1 change: 0 additions & 1 deletion ugali/pipeline/run_01.0_download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 1 addition & 3 deletions ugali/pipeline/run_03.0_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions ugali/pipeline/run_04.0_peak_finder.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions ugali/pipeline/run_05.0_followup.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions ugali/pipeline/run_06.0_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import shutil

import numpy as np
import numpy.lib.recfunctions as recfuncs
import fitsio

from ugali.analysis.pipeline import Pipeline
Expand All @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion ugali/preprocess/database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

import os, sys
import os
import re
import io
import subprocess
Expand Down
Loading