Skip to content

Commit 7490b42

Browse files
committed
stop oversmoothing everything!!
1 parent df2e32d commit 7490b42

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

echelle/echelle.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def plot_echelle(
118118
The plotted echelle diagram on the axes
119119
"""
120120
if smooth:
121-
power = smooth(power, smooth_filter_width)
121+
power = smooth_power(power, smooth_filter_width)
122122
echx, echy, echz = echelle(freq, power, dnu, **kwargs)
123123

124124
if scale is not None:
@@ -164,8 +164,9 @@ def interact_echelle(
164164
cmap="BuPu",
165165
ax=None,
166166
interpolation="none",
167+
smooth=False,
167168
smooth_filter_width=50.0,
168-
scale="sqrt",
169+
scale=None,#"sqrt",
169170
return_coords=False,
170171
**kwargs
171172
):
@@ -222,8 +223,8 @@ def interact_echelle(
222223

223224
if ax is None:
224225
fig, ax = plt.subplots()
225-
226-
power = smooth(power, smooth_filter_width)
226+
if smooth:
227+
power = smooth_power(power, smooth_filter_width)
227228

228229
x, y, z = echelle(freq, power, (dnu_max + dnu_min) / 2.0, **kwargs)
229230
plt.subplots_adjust(left=0.25, bottom=0.25)
@@ -256,10 +257,11 @@ def interact_echelle(
256257

257258
def update(dnu):
258259
x, y, z = echelle(freq, power, dnu, **kwargs)
259-
if scale is "sqrt":
260-
z = np.sqrt(z)
261-
elif scale is "log":
262-
z = np.log10(z)
260+
if scale is not None:
261+
if scale is "sqrt":
262+
z = np.sqrt(z)
263+
elif scale is "log":
264+
z = np.log10(z)
263265
line.set_array(z)
264266
line.set_extent((x.min(), x.max(), y.min(), y.max()))
265267
ax.set_xlim(0, dnu)
@@ -293,7 +295,7 @@ def on_click(event):
293295
return coords
294296

295297

296-
def smooth(power, smooth_filter_width):
298+
def smooth_power(power, smooth_filter_width):
297299
"""Smooths the input power array with a Box1DKernel from astropy
298300
299301
Parameters

0 commit comments

Comments
 (0)