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])