Skip to content

Commit

Permalink
remove deprecated things
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn committed Nov 8, 2019
1 parent ec36aa7 commit 65a7ad7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
12 changes: 3 additions & 9 deletions superfreq/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging

# Third-party
from astropy.extern.six import PY3
from astropy.logger import StreamHandler
from astropy.utils import find_current_module

Expand Down Expand Up @@ -40,14 +39,9 @@ def makeRecord(self, name, level, pathname, lineno, msg, args, exc_info,
else:
extra['origin'] = 'unknown'

if PY3:
return Logger.makeRecord(self, name, level, pathname, lineno, msg,
args, exc_info, func=func, extra=extra,
sinfo=sinfo)
else:
return Logger.makeRecord(self, name, level, pathname, lineno, msg,
args, exc_info, func=func, extra=extra)

return Logger.makeRecord(self, name, level, pathname, lineno, msg,
args, exc_info, func=func, extra=extra,
sinfo=sinfo)

logging.setLoggerClass(SFLogger)
logger = logging.getLogger('superfreq')
Expand Down
4 changes: 2 additions & 2 deletions superfreq/tests/data/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_isochrone_orbits(n_orbits=100, seed=42):
vel = np.vstack((vx, vy, vz))*galactic['length']/galactic['time']

# compute true actions, true frequencies
w0 = gd.CartesianPhaseSpacePosition(pos=pos, vel=vel)
w0 = gd.PhaseSpacePosition(pos=pos, vel=vel)
act, ang, frq = pot.action_angle(w0)

# reshape down to 2d
Expand Down Expand Up @@ -139,7 +139,7 @@ def get_harmonic_oscillator_orbits(n_orbits=100, seed=42):
vel = np.zeros((3, n_orbits))*galactic['length']/galactic['time']

# compute true actions, true frequencies
w0 = gd.CartesianPhaseSpacePosition(pos=pos, vel=vel)
w0 = gd.PhaseSpacePosition(pos=pos, vel=vel)
act, ang, frq = pot.action_angle(w0)
frq = np.repeat(frq[:,np.newaxis], axis=1, repeats=n_orbits)

Expand Down
2 changes: 1 addition & 1 deletion superfreq/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

def test_orbit_to_fs():
potential = gp.NFWPotential(m=1E12, r_s=15, b=0.9, c=0.8, units=galactic)
w0 = gd.CartesianPhaseSpacePosition(pos=[1.,0,0]*u.kpc,
w0 = gd.PhaseSpacePosition(pos=[1.,0,0]*u.kpc,
vel=[30.,150,71]*u.km/u.s)
P = 40*u.Myr
orbit = potential.integrate_orbit(w0, dt=P/128, t1=0*u.Myr, t2=P*128,
Expand Down

0 comments on commit 65a7ad7

Please sign in to comment.