Differences between revisions 1 and 2
Revision 1 as of 2020-03-18 17:14:03
Size: 552
Comment:
Revision 2 as of 2020-03-18 17:16:34
Size: 585
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
{{attachment:sample_calic.png}}

numpy, scipyなどのメモ

Time Seriesなどの計算小技

四則演算、指数

gwpyのTime SeriesやFrequency Seriesは、四則演算や指数の演算がそのまま使える。

   1 t = np.linspace(start=-10, stop=10, num=201)
   2 A = TimeSeries(np.sin(t), t0=1261872018)                                                                                                                                 
   3 plot = Plot(A, A+1, 2*A, A**2)
   4 ax = plot.gca().legend(['A', 'A+1', '2*A', 'A**2'], fontsize=18)
   5 plot.show()

sample_calic.png

KAGRA/Subgroups/PEM/PythonMemoJP/calculation (last edited 2021-07-29 15:34:38 by tatsuki.washimi)