-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplot_2D_multi.py
More file actions
36 lines (26 loc) · 1.01 KB
/
Copy pathplot_2D_multi.py
File metadata and controls
36 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import time
import numpy as np
import atomize.general_modules.general_functions as general
import atomize.general_modules.csv_opener_saver as openfile
file_handler = openfile.Saver_Opener()
data = np.zeros( (4, 10000, 10) )
step = 10
i = 0
process = 'None'
## 2D Plot
while i < 10:
axis_x = np.arange(10000)
ch_time = np.random.randint(250, 500, 1)
zs1 = 1 + 100*np.exp(-axis_x/ch_time) + 7*np.random.normal(size = (10000))
zs2 = 1 + 100*np.exp(-axis_x/ch_time) + 7*np.random.normal(size = (10000))
data[0, :, i] = zs1
data[1, :, i] = zs2
start_time = time.time()
# Plot_2d
process = general.plot_2d('2D Multi', data, xname='Time', start_step=( (0, 1), (0.3, 0.001) ),\
xscale='s', yname='Magnetic Field', yscale='T', zname='Intensity', zscale='V', pr=process)
general.wait('100 ms')
general.message(str(time.time() - start_time))
i += 1
#file_data = file_handler.create_file_dialog()
#file_handler.save_data(file_data, data, header = 'TEST', mode = 'w')