運動軌跡時間分析庫:Tsfeat
Tsfeat 是一個能夠按照時間順序分析運動軌跡工具。通常可以運用在氣象數據中心的風速分析,股市中的股價的變化等領域。
示例代碼:
#We open the ligth curve in two different bands
lc_B = FATS.ReadLC_MACHO('lc_1.3444.614.B.mjd') #58.6272.729 1.3444.614 1.4652.1527
lc_R = FATS.ReadLC_MACHO('lc_1.3444.614.R.mjd')
#We import the data
[mag, time, error] = lc_B.ReadLC()
[mag2, time2, error2] = lc_R.ReadLC()
#We preprocess the data
preproccesed_data = FATS.Preprocess_LC(mag, time, error)
[mag, time, error] = preproccesed_data.Preprocess()
preproccesed_data = FATS.Preprocess_LC(mag2, time2, error2)
[mag2, time2, error2] = preproccesed_data.Preprocess()
#We synchronize the data
if len(mag) != len(mag2):
[aligned_mag, aligned_mag2, aligned_time] = FATS.Align_LC(time, time2, mag, mag2, error, error2)
else:
aligned_mag = mag
aligned_mag2 = mag2
aligned_time = time
lc = np.array([mag,time,error,mag2,aligned_mag, aligned_mag2, aligned_time])

本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!