[plotter] [formatting] remove bare excepts
This commit is contained in:
+7
-8
@@ -35,7 +35,6 @@ from run_selector import RunSelector
|
||||
from units import U, unit_str, convert_exp
|
||||
|
||||
|
||||
from astrophysix.simdm.results import GenericResult
|
||||
from astrophysix.simdm.experiment import (
|
||||
ParameterSetting,
|
||||
ParameterVisibility,
|
||||
@@ -598,7 +597,7 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
|
||||
try:
|
||||
plot_overlay(ax_los, im_extent, **overlays_kwargs[i])
|
||||
except:
|
||||
except TypeError:
|
||||
plot_overlay(ax_los, im_extent)
|
||||
|
||||
return PlotInfo(
|
||||
@@ -706,7 +705,7 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
map_vh_red = dmap_vh[::vel_red, ::vel_red] * unit_old.express(unit)
|
||||
map_vv_red = dmap_vv[::vel_red, ::vel_red] * unit_old.express(unit)
|
||||
|
||||
# get norm infomartion
|
||||
# get norm information
|
||||
norm_v = np.sqrt(map_vh_red ** 2 + map_vv_red ** 2)
|
||||
max_v = np.max(norm_v)
|
||||
min_v = np.min(norm_v)
|
||||
@@ -856,8 +855,8 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
node = self.save.get_node(group + name)
|
||||
if xlog is None:
|
||||
try:
|
||||
xlog = node._v_attrs_.logbins
|
||||
except:
|
||||
xlog = node._v_attrs.logbins
|
||||
except AttributeError:
|
||||
xlog = False
|
||||
|
||||
# get label and units
|
||||
@@ -892,7 +891,7 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
nml = self.comp.get_nml(nml_color, run)
|
||||
try:
|
||||
color = colors[nml]
|
||||
except:
|
||||
except TypeError:
|
||||
color = colors(nml)
|
||||
|
||||
# Actual plot
|
||||
@@ -1081,7 +1080,7 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
nml = self.comp.get_nml(nml_color, run)
|
||||
try:
|
||||
color = colors[nml]
|
||||
except:
|
||||
except TypeError:
|
||||
color = colors(nml)
|
||||
if yerr is None:
|
||||
(base_line,) = plt.plot(x, y, label=label, color=color, **kwargs)
|
||||
@@ -1117,7 +1116,7 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
|
||||
def _pspec(self, name, **kwargs):
|
||||
"""
|
||||
Plot power spectrum
|
||||
Plot power spectrum (wrapper around pspec_read)
|
||||
"""
|
||||
del kwargs["run"]
|
||||
file_pspec = self.save.get_node("/hdf5/pspec").read()
|
||||
|
||||
Reference in New Issue
Block a user