-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Make sure to enforce that t1 and t2 are floats other wise you get inaccurate results
def planck_taper(tlist, t1, t2):
"""tlist: array of times
t1. for t<=t1 then return 0
t2. for t>=t2 then return 1
else return 1./(np.exp((t2-t1)/(t-t1)+(t2-t1)/(t-t2))+1)"""
tout = []
for t in tlist:
if t<=t1:
tout.append(0.)
elif t>=t2:
tout.append(1.)
else:
tout.append(1./(exp((t2-t1)/(t-t1)+(t2-t1)/(t-t2))+1))
return asarray(tout)
Reactions are currently unavailable