model_sersic3d.py   model_sersic3d.py 
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import numpy as np import numpy as np
try:
import math
except:
import numpy.math as math
from scipy import special from scipy import special
from astropy.io import fits from astropy.io import fits
from copy import deepcopy from copy import deepcopy
try: try:
import bottleneck as bn import bottleneck as bn
except ImportError: except ImportError:
import numpy as bn import numpy as bn
from .galaxy_parameters import GalaxyParameters from .galaxy_parameters import GalaxyParameters
from .model_utilities import modelPlots, ModelExt from .model_utilities import modelPlots, ModelExt
skipping to change at line 304 skipping to change at line 309
v_profile = max_vel * np.sqrt(v_sq) v_profile = max_vel * np.sqrt(v_sq)
elif self.rotation_curve == 'mass': elif self.rotation_curve == 'mass':
v_profile = self._fv_newton(radius_cube, galaxy['radius'], max_ vel) v_profile = self._fv_newton(radius_cube, galaxy['radius'], max_ vel)
elif self.rotation_curve == 'Freeman': elif self.rotation_curve == 'Freeman':
#Using Freeman disk. Vmax = V2.2 #Using Freeman disk. Vmax = V2.2
v_sq = self._v_disk_sq(galaxy, radius_cube) v_sq = self._v_disk_sq(galaxy, radius_cube)
v_profile = np.sqrt(v_sq) v_profile = np.sqrt(v_sq)
elif self.rotation_curve == 'Spano': elif self.rotation_curve == 'Spano':
# From Spano et al. 2008: https://doi.org/10.1111/j.1365-2966.2 007.12545.x # From Spano et al. 2008: https://doi.org/10.1111/j.1365-2966.2 007.12545.x
# and Hernandez-Hernandez et al. 2019 https://doi.org/10.1093/m nras/stz1969 # and Hernandez-Hernandez et al. 2019 https://doi.org/10.1093/m nras/stz1969
v_sq = 1/x * np.vectorize(np.math.asinh)(x) - 1. / (1+x**2) v_sq = 1/x * np.vectorize(math.asinh)(x) - 1. / (1+x**2)
v_profile = max_vel * np.sqrt(v_sq) v_profile = max_vel * np.sqrt(v_sq)
else: else:
raise NotImplementedError("Rotational Curve not supported. Shou ld be '%s' " % raise NotImplementedError("Rotational Curve not supported. Shou ld be '%s' " %
self.CURVE_VALID) self.CURVE_VALID)
return v_profile return v_profile
#Private methods #Private methods
def _v_disk_sq(self, parameters, radius): def _v_disk_sq(self, parameters, radius):
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/