Some corrections with static analysis
This commit is contained in:
+9
-7
@@ -53,12 +53,14 @@ class BaseProcessor:
|
|||||||
"""
|
"""
|
||||||
__metaclass__ = ABCMeta
|
__metaclass__ = ABCMeta
|
||||||
|
|
||||||
|
log_id = ""
|
||||||
|
rules = dict()
|
||||||
|
filename = ""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.def_rules()
|
self.def_rules()
|
||||||
|
|
||||||
log_id = ""
|
|
||||||
|
|
||||||
def _log(self, string, status=""):
|
def _log(self, string, status=""):
|
||||||
if len(status) > 0:
|
if len(status) > 0:
|
||||||
print(status + ": " + self.log_id + string)
|
print(status + ": " + self.log_id + string)
|
||||||
@@ -152,7 +154,7 @@ class PostProcessor(BaseProcessor):
|
|||||||
|
|
||||||
G = 1. # Gravitational constant
|
G = 1. # Gravitational constant
|
||||||
|
|
||||||
def __init__(self, path=None, num=None, path_out=None, filename=None, pp_params=Params()):
|
def __init__(self, path=None, num=None, path_out=None, pp_params=Params()):
|
||||||
"""
|
"""
|
||||||
Creates the basic structures needed for the outputs
|
Creates the basic structures needed for the outputs
|
||||||
"""
|
"""
|
||||||
@@ -336,7 +338,7 @@ class PostProcessor(BaseProcessor):
|
|||||||
|
|
||||||
# Ray tracer for the sound speed
|
# Ray tracer for the sound speed
|
||||||
if self.pp_params.pymses.fft:
|
if self.pp_params.pymses.fft:
|
||||||
rt_cs = splatting.SplatterProcessor(self._amr, ro.info, cs_op, surf_qty=False)
|
rt_cs = splatting.SplatterProcessor(self._amr, self._ro.info, cs_op, surf_qty=False)
|
||||||
else :
|
else :
|
||||||
rt_cs = raytracing.RayTracer(self._amr, self._ro.info, cs_op)
|
rt_cs = raytracing.RayTracer(self._amr, self._ro.info, cs_op)
|
||||||
|
|
||||||
@@ -347,7 +349,7 @@ class PostProcessor(BaseProcessor):
|
|||||||
|
|
||||||
return map_Q
|
return map_Q
|
||||||
|
|
||||||
def _radial_bins(self, ax_los):
|
def _radial_bins(self, _):
|
||||||
pos_star = self.pp_params.disk.pos_star
|
pos_star = self.pp_params.disk.pos_star
|
||||||
im_extent = self.save.root.maps._v_attrs.im_extent
|
im_extent = self.save.root.maps._v_attrs.im_extent
|
||||||
|
|
||||||
@@ -363,14 +365,14 @@ class PostProcessor(BaseProcessor):
|
|||||||
lrad_in = np.log10(bin_in)
|
lrad_in = np.log10(bin_in)
|
||||||
lrad_ext = np.log10(bin_out)
|
lrad_ext = np.log10(bin_out)
|
||||||
rad_bins = np.logspace(lrad_in, lrad_ext, num=nb_bin)
|
rad_bins = np.logspace(lrad_in, lrad_ext, num=nb_bin)
|
||||||
elif binning == 'lin':
|
elif self.pp_params.disk.binning == 'lin':
|
||||||
rad_bins = np.linspace(bin_in, bin_out, num=nb_bin)
|
rad_bins = np.linspace(bin_in, bin_out, num=nb_bin)
|
||||||
|
|
||||||
# Add boundaries
|
# Add boundaries
|
||||||
rad_bins = np.concatenate(([0.], rad_bins, [rad_of_box]))
|
rad_bins = np.concatenate(([0.], rad_bins, [rad_of_box]))
|
||||||
return rad_bins
|
return rad_bins
|
||||||
|
|
||||||
def _rr(self, ax_los):
|
def _rr(self, _):
|
||||||
im_extent = self.save.root.maps._v_attrs.im_extent
|
im_extent = self.save.root.maps._v_attrs.im_extent
|
||||||
map_size = self.pp_params.out.map_size
|
map_size = self.pp_params.out.map_size
|
||||||
pos_star = self.pp_params.disk.pos_star
|
pos_star = self.pp_params.disk.pos_star
|
||||||
|
|||||||
Reference in New Issue
Block a user