Skip to content

Commit

Permalink
python refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed Oct 27, 2023
1 parent f19231a commit 5217638
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
9 changes: 3 additions & 6 deletions rebound/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@ class ParticleNotFound(Exception):

from .hash import hash
from .tools import mod2pi, M_to_f, E_to_f, M_to_E, spherical_to_xyz, xyz_to_spherical
from .simulation import Simulation, Orbit, Variation, ODE, Vec3d, Vec3dBasic
from .simulation import Simulation, Variation, ODE, Vec3d, Vec3dBasic
from .rotation import Rotation
from .orbit import Orbit
from .particle import Particle
from .plotting import OrbitPlot, OrbitPlotSet
from .simulationarchive import Simulationarchive

class InterruptiblePool:
def __init__(self, processes=None, initializer=None, initargs=(), **kwargs):
raise RuntimeError("InterruptiblePool is deprecated. Use the multiprocess module instead.")

__all__ = ["__libpath__", "__version__", "__build__", "__githash__", "Simulationarchive", "Simulation", "Orbit", "OrbitPlot", "OrbitPlotSet", "Particle", "SimulationError", "Encounter", "Collision", "Escape", "NoParticles", "ParticleNotFound", "InterruptiblePool","Variation", "clibrebound", "mod2pi", "M_to_f", "E_to_f", "M_to_E", "ODE", "Rotation", "Vec3d", "spherical_to_xyz", "xyz_to_spherical"]
__all__ = ["__libpath__", "__version__", "__build__", "__githash__", "Simulationarchive", "Simulation", "Orbit", "OrbitPlot", "OrbitPlotSet", "Particle", "SimulationError", "Encounter", "Collision", "Escape", "NoParticles", "ParticleNotFound", "Variation", "clibrebound", "mod2pi", "M_to_f", "E_to_f", "M_to_E", "ODE", "Rotation", "Vec3d", "spherical_to_xyz", "xyz_to_spherical"]
8 changes: 3 additions & 5 deletions rebound/simulation.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from ctypes import Structure, c_double, POINTER, c_uint32, c_float, c_int, c_uint, c_uint32, c_int64, c_long, c_ulong, c_ulonglong, c_void_p, c_char_p, CFUNCTYPE, byref, create_string_buffer, addressof, pointer, cast, c_char, c_size_t, string_at, sizeof
from . import clibrebound, Escape, NoParticles, Encounter, Collision, SimulationError, ParticleNotFound
from ctypes import Structure, c_double, POINTER, c_uint32, c_float, c_int, c_uint, c_long, c_ulong, c_ulonglong, c_void_p, c_char_p, CFUNCTYPE, byref, create_string_buffer, addressof, pointer, c_char, c_size_t, string_at
from . import clibrebound, Escape, NoParticles, Encounter, Collision, SimulationError
from .citations import cite
from .particle import Particle
from .particles import Particles
from .orbit import Orbit
from .units import units_convert_particle, check_units, convert_G, hash_to_unit
from .hash import hash as rebhash, HashPointerPair
from .vectors import *
import math
from .vectors import Vec3d, Vec3dBasic, Vec6d
import os
import sys
import warnings
Expand Down
2 changes: 0 additions & 2 deletions rebound/simulationarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import math
import warnings

POINTER_REB_SIM = POINTER(Simulation)

class Simulationarchive(Structure):
"""
Simulationarchive Class.
Expand Down

0 comments on commit 5217638

Please sign in to comment.