Skip to content

Commit 03c0ef2

Browse files
committed
simplified shift smoothing
1 parent fe6c019 commit 03c0ef2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tessreduce/helpers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def difference_shifts(image,ref):#,eimage,eref):
354354
s = np.zeros((2)) * np.nan
355355
return s
356356

357-
def Smooth_motion(Centroids,tpf):
357+
def Smooth_motion(Centroids,tpf,skernel=25):
358358
"""
359359
Calculate the smoothed centroid shift
360360
@@ -374,11 +374,11 @@ def Smooth_motion(Centroids,tpf):
374374
375375
"""
376376
smoothed = np.zeros_like(Centroids) * np.nan
377-
skernel = int(len(tpf.flux) * 0.01) #simple way of making the smoothing window 10% of the duration
378-
skernel = skernel // 2 +1
379-
#skernel = 25
380-
if skernel < 25:
381-
skernel = 25
377+
# skernel = int(len(tpf.flux) * 0.01) #simple way of making the smoothing window 10% of the duration
378+
# skernel = skernel // 2 +1
379+
# #skernel = 25
380+
# if skernel < 25:
381+
# skernel = 25
382382
try:
383383
try:
384384
split = np.where(np.diff(tpf.time.mjd) > 0.5)[0][0] + 1

0 commit comments

Comments
 (0)