1
0
Fork 0

Do not fit polynomials if no range in time

pull/13/merge
Cees Bassa 2018-03-04 10:23:12 +01:00
parent c973395625
commit 2b5985dff8
1 changed files with 4 additions and 0 deletions

View File

@ -162,6 +162,10 @@ def extract_tracks(fname,trkrmin,drdtmin,trksig,ntrkmin):
tmid=0.5*(tmax+tmin)
mjd=ff.mjd+tmid/86400.0
# Skip if no variance in time
if np.std(t-tmid)==0.0:
continue
# Very simple polynomial fit; no weighting, no cleaning
px=np.polyfit(t-tmid,x,1)
py=np.polyfit(t-tmid,y,1)