-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplot_2D.py
More file actions
32 lines (22 loc) · 847 Bytes
/
Copy pathplot_2D.py
File metadata and controls
32 lines (22 loc) · 847 Bytes
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
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( (10000, 10) )
step = 10
i = 0
## 2D Plot
while i < 10:
axis_x = np.arange(10000)
ch_time = np.random.randint(250, 500, 1)
zs = 1 + 100*np.exp(-axis_x/ch_time) + 7*np.random.normal(size = (10000))
data[:, i] = zs
start_time = time.time()
# plot_2d
general.plot_2d('2D', data, xname='Time', start_step=( (0, 1), (0.3, 0.001) ),\
xscale='s', yname='Magnetic Field', yscale='T', zname='Intensity', zscale='V')
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')