投稿

7月, 2023の投稿を表示しています

Coil simulator (mono coil)

モノコイルのシミュレーター ### Pulse magnet simulator v0.1 ### by A. Ikeda (UEC-Tokyo, 30 April 2022) ### references ### 1. Example program (3) in https://qiita.com/sci_Haru/items/b8d5c9cfe64c4366630a ### 2. A program for iGor pro, Master thesis, Takeshi Nakamura, Y. H. Matsuda lab., Univ. of Tokyo (2010) ### 3. Pulse magnet for high field generation, N. Miura (2008) # # # # # # # # # # # # # # # # # # # # # # # # # # # Imports # # # # # # # # # # # # # # # # # # # # # # # # # # # import numpy as np import matplotlib.pyplot as plt # %matplotlib inline # plt.style.use('./ai.mplstyle') # %matplotlib tk res_x = [] res_y = [] reserve_v = [] reserve_i = [] reserve_tp = [] reserve_t = [] reserve_bf = [] # # # # # # # # # # # # # # # # # # # # # # # # # # # Input parameter # # ...

GUIの進歩

イメージ
 今日、すごい進歩したので動画ではります。

Python: 1D 2D データを格納したリスト(stack)を作る

Untitled Making a stack of 2D and 1D data ¶ In [51]: import numpy as np In [52]: a1 = np . ones ( 6 ) . reshape ( 2 , 3 ) a2 = a1 * 2 make a stack of two images ¶ In [53]: mat1 = np . stack ([ a1 , a2 ]) add an image to the stack of two images ¶ In [54]: mat1 = np . vstack ([ mat1 , [ a1 ]]) In [55]: mat1 Out[55]: array([[[1., 1., 1.], [1., 1., 1.]], [[2., 2., 2.], [2., 2., 2.]], [[1., 1., 1.], [1., 1., 1.]]]) In [56]: b1 = np . ones ( 6 ) b2 = b1 * 2 b3 = b1 * 3 make a stack of two 1D list ¶ In [57]: mat2 = np . vstack ([ b1 , b2 ]) add a 1D list to the stack of two 1D list ¶ In [58]...