From 2d6fa71b676b62e99145a93af739962fb9fc5cb5 Mon Sep 17 00:00:00 2001 From: Jack Lovell Date: Wed, 29 Jul 2020 15:45:27 +0100 Subject: [PATCH] Update imports for compatibility with raysect 0.7 --- cherab/solps/formats/balance.py | 2 +- cherab/solps/formats/mdsplus.py | 2 +- cherab/solps/formats/raw_simulation_files.py | 2 +- cherab/solps/mesh_geometry.py | 2 +- cherab/solps/solps_3d_functions.pyx | 3 +-- cherab/solps/solps_plasma.py | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cherab/solps/formats/balance.py b/cherab/solps/formats/balance.py index f2f4bf1..90e4ed9 100644 --- a/cherab/solps/formats/balance.py +++ b/cherab/solps/formats/balance.py @@ -20,7 +20,7 @@ import numpy as np from scipy.io import netcdf from scipy.constants import elementary_charge -from raysect.core.math import Discrete2DMesh +from raysect.core.math.function.float import Discrete2DMesh from cherab.core.math.mappers import AxisymmetricMapper from cherab.core.atomic.elements import hydrogen, deuterium, helium, beryllium, carbon, nitrogen, oxygen, neon, \ diff --git a/cherab/solps/formats/mdsplus.py b/cherab/solps/formats/mdsplus.py index b9e7f6a..bc9e3ae 100644 --- a/cherab/solps/formats/mdsplus.py +++ b/cherab/solps/formats/mdsplus.py @@ -21,7 +21,7 @@ import numpy as np from math import sqrt from raysect.core import Point2D -from raysect.core.math.function import Discrete2DMesh +from raysect.core.math.function.float import Discrete2DMesh from cherab.core.math.mappers import AxisymmetricMapper from cherab.solps.mesh_geometry import SOLPSMesh diff --git a/cherab/solps/formats/raw_simulation_files.py b/cherab/solps/formats/raw_simulation_files.py index 69ceffb..ea0354d 100644 --- a/cherab/solps/formats/raw_simulation_files.py +++ b/cherab/solps/formats/raw_simulation_files.py @@ -19,7 +19,7 @@ import os import numpy as np -from raysect.core.math.function import Discrete2DMesh +from raysect.core.math.function.float import Discrete2DMesh from cherab.core.math.mappers import AxisymmetricMapper from cherab.core.atomic.elements import hydrogen, deuterium, helium, beryllium, carbon, nitrogen, oxygen, neon, \ diff --git a/cherab/solps/mesh_geometry.py b/cherab/solps/mesh_geometry.py index 913ce84..77d117a 100755 --- a/cherab/solps/mesh_geometry.py +++ b/cherab/solps/mesh_geometry.py @@ -24,7 +24,7 @@ import matplotlib.pyplot as plt from matplotlib.patches import Polygon from matplotlib.collections import PatchCollection -from raysect.core.math.function import Discrete2DMesh +from raysect.core.math.function.float import Discrete2DMesh INFINITY = 1E99 diff --git a/cherab/solps/solps_3d_functions.pyx b/cherab/solps/solps_3d_functions.pyx index 02a51eb..c828ffc 100755 --- a/cherab/solps/solps_3d_functions.pyx +++ b/cherab/solps/solps_3d_functions.pyx @@ -23,11 +23,10 @@ import numpy as np from numpy cimport ndarray from raysect.core.math.vector cimport Vector3D, new_vector3d -from raysect.core.math.function cimport Discrete2DMesh, Function3D from raysect.core.math.transform cimport rotate_z from cherab.core.math.mappers cimport AxisymmetricMapper -from cherab.core.math.function.vectorfunction3d cimport VectorFunction3D +from cherab.core.math.function cimport Function3D, Discrete2DMesh, VectorFunction3D cimport cython cdef double RAD_TO_DEG = 360 / (2*M_PI) diff --git a/cherab/solps/solps_plasma.py b/cherab/solps/solps_plasma.py index 297b72a..4b21488 100755 --- a/cherab/solps/solps_plasma.py +++ b/cherab/solps/solps_plasma.py @@ -24,7 +24,7 @@ from scipy.constants import atomic_mass, electron_mass # Raysect imports -from raysect.core.math.function import Discrete2DMesh +from raysect.core.math.function.float import Discrete2DMesh from raysect.core import translate, Point3D, Vector3D, Node, AffineMatrix3D from raysect.primitive import Cylinder from raysect.optical import Spectrum