Note
Go to the end to download the full example code.
EELS curve fitting#
Performs curve fitting to an EELS spectrum, plots the result and saves it as png file.

0%| | 0.00/42.3M [00:00<?, ?B/s]
0%| | 2.05k/42.3M [00:00<38:15, 18.4kB/s]
0%| | 39.9k/42.3M [00:00<03:55, 179kB/s]
0%| | 95.2k/42.3M [00:00<02:30, 281kB/s]
0%|▏ | 153k/42.3M [00:00<02:17, 306kB/s]
1%|▎ | 317k/42.3M [00:00<01:09, 601kB/s]
1%|▍ | 419k/42.3M [00:00<01:05, 638kB/s]
1%|▍ | 500k/42.3M [00:00<01:07, 617kB/s]
1%|▌ | 598k/42.3M [00:01<01:05, 641kB/s]
2%|▋ | 713k/42.3M [00:01<00:59, 693kB/s]
2%|▋ | 795k/42.3M [00:01<01:03, 658kB/s]
2%|▊ | 893k/42.3M [00:01<01:01, 669kB/s]
2%|▉ | 1.01M/42.3M [00:01<00:58, 709kB/s]
3%|█ | 1.15M/42.3M [00:01<00:50, 809kB/s]
3%|█ | 1.24M/42.3M [00:01<00:55, 735kB/s]
3%|█▏ | 1.35M/42.3M [00:02<00:54, 757kB/s]
3%|█▎ | 1.43M/42.3M [00:02<00:58, 703kB/s]
4%|█▍ | 1.60M/42.3M [00:02<00:49, 829kB/s]
4%|█▌ | 1.69M/42.3M [00:02<00:51, 789kB/s]
4%|█▋ | 1.81M/42.3M [00:02<00:50, 794kB/s]
5%|█▋ | 1.91M/42.3M [00:02<00:52, 764kB/s]
5%|█▊ | 2.00M/42.3M [00:02<00:54, 743kB/s]
5%|█▉ | 2.10M/42.3M [00:03<00:55, 725kB/s]
5%|█▉ | 2.18M/42.3M [00:03<00:58, 681kB/s]
5%|██ | 2.28M/42.3M [00:03<00:58, 684kB/s]
6%|██▏ | 2.40M/42.3M [00:03<00:55, 721kB/s]
6%|██▏ | 2.48M/42.3M [00:03<00:59, 670kB/s]
6%|██▎ | 2.61M/42.3M [00:03<00:53, 742kB/s]
6%|██▍ | 2.74M/42.3M [00:03<00:49, 796kB/s]
7%|██▌ | 2.82M/42.3M [00:04<00:54, 724kB/s]
7%|██▋ | 2.97M/42.3M [00:04<00:48, 817kB/s]
7%|██▋ | 3.05M/42.3M [00:04<00:52, 749kB/s]
8%|██▊ | 3.18M/42.3M [00:04<00:49, 795kB/s]
8%|██▉ | 3.26M/42.3M [00:04<00:53, 731kB/s]
8%|███ | 3.36M/42.3M [00:04<00:54, 718kB/s]
8%|███▏ | 3.49M/42.3M [00:04<00:49, 779kB/s]
9%|███▎ | 3.62M/42.3M [00:05<00:47, 820kB/s]
9%|███▎ | 3.72M/42.3M [00:05<00:49, 782kB/s]
9%|███▍ | 3.85M/42.3M [00:05<00:46, 824kB/s]
9%|███▌ | 3.95M/42.3M [00:05<00:48, 784kB/s]
10%|███▋ | 4.08M/42.3M [00:05<00:46, 826kB/s]
10%|███▊ | 4.20M/42.3M [00:05<00:46, 817kB/s]
10%|███▉ | 4.33M/42.3M [00:05<00:44, 848kB/s]
11%|████ | 4.46M/42.3M [00:06<00:43, 872kB/s]
11%|████ | 4.56M/42.3M [00:06<00:46, 818kB/s]
11%|████▏ | 4.65M/42.3M [00:06<00:48, 782kB/s]
11%|████▎ | 4.73M/42.3M [00:06<00:52, 718kB/s]
12%|████▍ | 4.88M/42.3M [00:06<00:45, 814kB/s]
12%|████▌ | 5.03M/42.3M [00:06<00:42, 881kB/s]
12%|████▋ | 5.18M/42.3M [00:06<00:40, 923kB/s]
12%|████▋ | 5.27M/42.3M [00:07<00:43, 852kB/s]
13%|████▊ | 5.39M/42.3M [00:07<00:44, 838kB/s]
13%|████▉ | 5.47M/42.3M [00:07<00:48, 764kB/s]
13%|█████ | 5.57M/42.3M [00:07<00:49, 737kB/s]
13%|█████ | 5.65M/42.3M [00:07<00:53, 689kB/s]
14%|█████▏ | 5.75M/42.3M [00:07<00:53, 688kB/s]
14%|█████▎ | 5.85M/42.3M [00:07<00:52, 690kB/s]
14%|█████▎ | 5.93M/42.3M [00:08<00:55, 656kB/s]
14%|█████▍ | 6.03M/42.3M [00:08<00:54, 667kB/s]
15%|█████▌ | 6.14M/42.3M [00:08<00:50, 709kB/s]
15%|█████▌ | 6.26M/42.3M [00:08<00:48, 736kB/s]
15%|█████▊ | 6.40M/42.3M [00:08<00:43, 827kB/s]
15%|█████▊ | 6.52M/42.3M [00:08<00:43, 821kB/s]
16%|█████▉ | 6.62M/42.3M [00:08<00:45, 781kB/s]
16%|██████ | 6.70M/42.3M [00:09<00:49, 717kB/s]
16%|██████ | 6.80M/42.3M [00:09<00:50, 704kB/s]
16%|██████▏ | 6.93M/42.3M [00:09<00:46, 764kB/s]
17%|██████▎ | 7.02M/42.3M [00:09<00:47, 740kB/s]
17%|██████▍ | 7.11M/42.3M [00:09<00:51, 687kB/s]
17%|██████▌ | 7.33M/42.3M [00:09<00:36, 957kB/s]
18%|██████▋ | 7.43M/42.3M [00:09<00:39, 879kB/s]
18%|██████▊ | 7.53M/42.3M [00:10<00:42, 822kB/s]
18%|██████▉ | 7.68M/42.3M [00:10<00:39, 887kB/s]
18%|██████▉ | 7.78M/42.3M [00:10<00:41, 829kB/s]
19%|███████ | 7.89M/42.3M [00:10<00:41, 820kB/s]
19%|███████▏ | 7.97M/42.3M [00:10<00:45, 750kB/s]
19%|███████▎ | 8.07M/42.3M [00:10<00:47, 724kB/s]
19%|███████▍ | 8.22M/42.3M [00:10<00:41, 818kB/s]
20%|███████▍ | 8.32M/42.3M [00:11<00:43, 780kB/s]
20%|███████▌ | 8.41M/42.3M [00:11<00:45, 752kB/s]
20%|███████▋ | 8.55M/42.3M [00:11<00:42, 803kB/s]
20%|███████▊ | 8.64M/42.3M [00:11<00:43, 770kB/s]
21%|███████▉ | 8.86M/42.3M [00:11<00:33, 989kB/s]
21%|████████ | 8.99M/42.3M [00:11<00:34, 967kB/s]
21%|████████▏ | 9.08M/42.3M [00:11<00:37, 885kB/s]
22%|████████▎ | 9.20M/42.3M [00:12<00:38, 862kB/s]
22%|████████▍ | 9.33M/42.3M [00:12<00:37, 881kB/s]
22%|████████▍ | 9.42M/42.3M [00:12<00:41, 789kB/s]
22%|████████▌ | 9.51M/42.3M [00:12<00:44, 739kB/s]
23%|████████▋ | 9.64M/42.3M [00:12<00:41, 792kB/s]
23%|████████▊ | 9.74M/42.3M [00:12<00:42, 762kB/s]
23%|████████▊ | 9.82M/42.3M [00:12<00:46, 705kB/s]
24%|████████▉ | 9.97M/42.3M [00:13<00:40, 802kB/s]
24%|█████████ | 10.1M/42.3M [00:13<00:40, 804kB/s]
24%|█████████▏ | 10.3M/42.3M [00:13<00:33, 942kB/s]
25%|█████████▎ | 10.4M/42.3M [00:13<00:36, 868kB/s]
25%|█████████▍ | 10.5M/42.3M [00:13<00:34, 917kB/s]
25%|█████████▌ | 10.6M/42.3M [00:13<00:37, 850kB/s]
25%|█████████▋ | 10.7M/42.3M [00:13<00:37, 837kB/s]
26%|█████████▊ | 10.9M/42.3M [00:14<00:36, 863kB/s]
26%|█████████▊ | 11.0M/42.3M [00:14<00:35, 879kB/s]
26%|█████████▉ | 11.1M/42.3M [00:14<00:38, 821kB/s]
27%|██████████ | 11.2M/42.3M [00:14<00:35, 884kB/s]
27%|██████████▏ | 11.3M/42.3M [00:14<00:37, 819kB/s]
27%|██████████▎ | 11.4M/42.3M [00:14<00:37, 815kB/s]
27%|██████████▍ | 11.6M/42.3M [00:14<00:37, 811kB/s]
28%|██████████▍ | 11.7M/42.3M [00:15<00:39, 775kB/s]
28%|██████████▌ | 11.8M/42.3M [00:15<00:37, 819kB/s]
28%|██████████▋ | 11.9M/42.3M [00:15<00:37, 816kB/s]
28%|██████████▊ | 12.0M/42.3M [00:15<00:38, 778kB/s]
29%|██████████▉ | 12.1M/42.3M [00:15<00:36, 820kB/s]
29%|██████████▉ | 12.2M/42.3M [00:15<00:40, 748kB/s]
29%|███████████ | 12.4M/42.3M [00:15<00:35, 832kB/s]
29%|███████████▏ | 12.5M/42.3M [00:16<00:37, 791kB/s]
30%|███████████▎ | 12.6M/42.3M [00:16<00:37, 796kB/s]
30%|███████████▍ | 12.7M/42.3M [00:16<00:37, 797kB/s]
30%|███████████▌ | 12.8M/42.3M [00:16<00:35, 833kB/s]
31%|███████████▋ | 12.9M/42.3M [00:16<00:34, 860kB/s]
31%|███████████▋ | 13.0M/42.3M [00:16<00:37, 784kB/s]
31%|███████████▊ | 13.1M/42.3M [00:16<00:40, 716kB/s]
31%|███████████▉ | 13.2M/42.3M [00:17<00:37, 773kB/s]
32%|████████████ | 13.4M/42.3M [00:17<00:33, 852kB/s]
32%|████████████▏ | 13.6M/42.3M [00:17<00:29, 977kB/s]
32%|████████████▎ | 13.7M/42.3M [00:17<00:32, 892kB/s]
33%|████████████▎ | 13.8M/42.3M [00:17<00:34, 830kB/s]
33%|████████████▍ | 13.8M/42.3M [00:17<00:37, 758kB/s]
33%|████████████▌ | 14.0M/42.3M [00:17<00:35, 803kB/s]
33%|████████████▋ | 14.1M/42.3M [00:18<00:36, 766kB/s]
34%|████████████▊ | 14.2M/42.3M [00:18<00:36, 776kB/s]
34%|████████████▉ | 14.3M/42.3M [00:18<00:32, 855kB/s]
34%|█████████████ | 14.5M/42.3M [00:18<00:31, 875kB/s]
34%|█████████████ | 14.6M/42.3M [00:18<00:32, 855kB/s]
35%|████████████▉ | 14.8M/42.3M [00:18<00:27, 1.01MB/s]
35%|█████████████▍ | 14.9M/42.3M [00:18<00:28, 951kB/s]
35%|█████████████▍ | 15.0M/42.3M [00:19<00:30, 908kB/s]
36%|█████████████▌ | 15.1M/42.3M [00:19<00:32, 843kB/s]
36%|█████████████▋ | 15.2M/42.3M [00:19<00:35, 770kB/s]
36%|█████████████▋ | 15.3M/42.3M [00:19<00:36, 734kB/s]
36%|█████████████▊ | 15.4M/42.3M [00:19<00:37, 717kB/s]
37%|█████████████▉ | 15.5M/42.3M [00:19<00:39, 674kB/s]
37%|██████████████ | 15.6M/42.3M [00:19<00:37, 709kB/s]
37%|██████████████▏ | 15.8M/42.3M [00:20<00:30, 874kB/s]
37%|██████████████▏ | 15.8M/42.3M [00:20<00:33, 798kB/s]
38%|██████████████▎ | 16.0M/42.3M [00:20<00:33, 786kB/s]
38%|██████████████▍ | 16.1M/42.3M [00:20<00:33, 793kB/s]
38%|██████████████▌ | 16.2M/42.3M [00:20<00:31, 832kB/s]
39%|██████████████▋ | 16.3M/42.3M [00:20<00:34, 760kB/s]
39%|██████████████▊ | 16.4M/42.3M [00:20<00:30, 836kB/s]
39%|██████████████▊ | 16.5M/42.3M [00:21<00:32, 793kB/s]
39%|██████████████▉ | 16.6M/42.3M [00:21<00:33, 763kB/s]
40%|███████████████ | 16.7M/42.3M [00:21<00:33, 773kB/s]
40%|███████████████▏ | 16.8M/42.3M [00:21<00:34, 746kB/s]
40%|███████████████▏ | 16.9M/42.3M [00:21<00:37, 681kB/s]
40%|███████████████▎ | 17.0M/42.3M [00:21<00:40, 631kB/s]
40%|███████████████▍ | 17.1M/42.3M [00:21<00:35, 718kB/s]
41%|███████████████▏ | 17.4M/42.3M [00:22<00:23, 1.05MB/s]
42%|███████████████▍ | 17.6M/42.3M [00:22<00:20, 1.19MB/s]
42%|███████████████▌ | 17.7M/42.3M [00:22<00:22, 1.11MB/s]
42%|███████████████▌ | 17.8M/42.3M [00:22<00:24, 1.01MB/s]
42%|████████████████ | 17.9M/42.3M [00:22<00:26, 922kB/s]
43%|████████████████▏ | 18.1M/42.3M [00:22<00:26, 920kB/s]
43%|████████████████▎ | 18.2M/42.3M [00:22<00:27, 886kB/s]
43%|████████████████▍ | 18.3M/42.3M [00:23<00:25, 931kB/s]
44%|████████████████▌ | 18.4M/42.3M [00:23<00:26, 891kB/s]
44%|████████████████▋ | 18.6M/42.3M [00:23<00:23, 995kB/s]
44%|████████████████▊ | 18.7M/42.3M [00:23<00:26, 894kB/s]
45%|████████████████▉ | 18.8M/42.3M [00:23<00:28, 832kB/s]
45%|████████████████▉ | 18.9M/42.3M [00:23<00:29, 791kB/s]
45%|█████████████████ | 19.0M/42.3M [00:23<00:29, 793kB/s]
45%|█████████████████▏ | 19.2M/42.3M [00:24<00:27, 832kB/s]
46%|█████████████████▎ | 19.3M/42.3M [00:24<00:26, 858kB/s]
46%|█████████████████▍ | 19.4M/42.3M [00:24<00:27, 843kB/s]
46%|█████████████████▌ | 19.5M/42.3M [00:24<00:26, 865kB/s]
47%|█████████████████▋ | 19.7M/42.3M [00:24<00:24, 914kB/s]
47%|█████████████████▊ | 19.8M/42.3M [00:24<00:26, 848kB/s]
47%|█████████████████▉ | 19.9M/42.3M [00:24<00:24, 905kB/s]
47%|██████████████████ | 20.1M/42.3M [00:25<00:23, 938kB/s]
48%|██████████████████▏ | 20.2M/42.3M [00:25<00:23, 931kB/s]
48%|██████████████████▎ | 20.3M/42.3M [00:25<00:23, 922kB/s]
48%|██████████████████▎ | 20.4M/42.3M [00:25<00:25, 853kB/s]
49%|██████████████████▌ | 20.6M/42.3M [00:25<00:22, 976kB/s]
49%|██████████████████▌ | 20.7M/42.3M [00:25<00:24, 891kB/s]
49%|██████████████████▋ | 20.8M/42.3M [00:25<00:25, 832kB/s]
49%|██████████████████▊ | 20.9M/42.3M [00:26<00:25, 824kB/s]
50%|██████████████████▉ | 21.1M/42.3M [00:26<00:24, 852kB/s]
50%|███████████████████ | 21.2M/42.3M [00:26<00:25, 839kB/s]
50%|███████████████████▏ | 21.3M/42.3M [00:26<00:25, 830kB/s]
51%|███████████████████▏ | 21.4M/42.3M [00:26<00:25, 823kB/s]
51%|███████████████████▎ | 21.5M/42.3M [00:26<00:27, 754kB/s]
52%|███████████████████▎ | 22.1M/42.3M [00:26<00:10, 1.85MB/s]
55%|████████████████████▍ | 23.4M/42.3M [00:27<00:04, 3.92MB/s]
57%|████████████████████▉ | 23.9M/42.3M [00:27<00:04, 4.05MB/s]
63%|███████████████████████▍ | 26.8M/42.3M [00:27<00:01, 9.81MB/s]
66%|████████████████████████▍ | 27.9M/42.3M [00:27<00:01, 8.15MB/s]
68%|█████████████████████████▎ | 28.9M/42.3M [00:27<00:01, 7.68MB/s]
70%|██████████████████████████ | 29.7M/42.3M [00:28<00:02, 4.60MB/s]
72%|██████████████████████████▌ | 30.4M/42.3M [00:28<00:02, 4.60MB/s]
73%|███████████████████████████▏ | 31.0M/42.3M [00:28<00:03, 3.70MB/s]
75%|███████████████████████████▌ | 31.5M/42.3M [00:28<00:02, 3.65MB/s]
76%|███████████████████████████▉ | 32.0M/42.3M [00:28<00:03, 3.41MB/s]
77%|████████████████████████████▎ | 32.4M/42.3M [00:28<00:03, 3.24MB/s]
77%|████████████████████████████▋ | 32.7M/42.3M [00:29<00:03, 3.16MB/s]
78%|████████████████████████████▉ | 33.1M/42.3M [00:29<00:03, 2.95MB/s]
79%|█████████████████████████████▏ | 33.4M/42.3M [00:29<00:03, 2.74MB/s]
80%|█████████████████████████████▌ | 33.7M/42.3M [00:29<00:03, 2.65MB/s]
81%|█████████████████████████████▊ | 34.1M/42.3M [00:29<00:03, 2.68MB/s]
82%|██████████████████████████████▏ | 34.5M/42.3M [00:29<00:02, 2.77MB/s]
83%|██████████████████████████████▌ | 34.9M/42.3M [00:29<00:02, 2.77MB/s]
84%|██████████████████████████████▉ | 35.3M/42.3M [00:30<00:02, 2.83MB/s]
85%|███████████████████████████████▎ | 35.7M/42.3M [00:30<00:02, 2.81MB/s]
85%|███████████████████████████████▌ | 36.1M/42.3M [00:30<00:02, 2.80MB/s]
86%|███████████████████████████████▉ | 36.5M/42.3M [00:30<00:02, 2.79MB/s]
87%|████████████████████████████████▎ | 36.9M/42.3M [00:30<00:01, 2.79MB/s]
88%|████████████████████████████████▋ | 37.3M/42.3M [00:30<00:01, 2.74MB/s]
89%|█████████████████████████████████ | 37.7M/42.3M [00:30<00:01, 2.75MB/s]
90%|█████████████████████████████████▎ | 38.1M/42.3M [00:31<00:01, 2.78MB/s]
91%|█████████████████████████████████▌ | 38.4M/42.3M [00:31<00:01, 2.54MB/s]
92%|█████████████████████████████████▉ | 38.8M/42.3M [00:31<00:01, 2.57MB/s]
93%|██████████████████████████████████▎ | 39.1M/42.3M [00:31<00:01, 2.59MB/s]
94%|██████████████████████████████████▌ | 39.5M/42.3M [00:31<00:01, 2.64MB/s]
94%|██████████████████████████████████▉ | 40.0M/42.3M [00:31<00:00, 2.71MB/s]
95%|███████████████████████████████████▏ | 40.2M/42.3M [00:31<00:00, 2.49MB/s]
96%|███████████████████████████████████▍ | 40.5M/42.3M [00:32<00:00, 2.37MB/s]
97%|███████████████████████████████████▊ | 40.9M/42.3M [00:32<00:00, 2.48MB/s]
98%|████████████████████████████████████▏| 41.3M/42.3M [00:32<00:00, 2.56MB/s]
98%|████████████████████████████████████▎| 41.6M/42.3M [00:32<00:00, 2.34MB/s]
99%|████████████████████████████████████▌| 41.8M/42.3M [00:32<00:00, 1.84MB/s]
99%|████████████████████████████████████▊| 42.1M/42.3M [00:32<00:00, 1.83MB/s]
0%| | 0.00/42.3M [00:00<?, ?B/s]
100%|██████████████████████████████████████| 42.3M/42.3M [00:00<00:00, 258GB/s]
0%| | 0.00/66.1M [00:00<?, ?B/s]
0%| | 1.02k/66.1M [00:00<2:48:27, 6.54kB/s]
0%| | 33.8k/66.1M [00:00<08:48, 125kB/s]
0%| | 92.2k/66.1M [00:00<04:39, 236kB/s]
0%| | 170k/66.1M [00:00<03:15, 336kB/s]
0%|▏ | 236k/66.1M [00:00<03:01, 364kB/s]
0%|▏ | 317k/66.1M [00:00<02:38, 416kB/s]
1%|▏ | 399k/66.1M [00:01<02:26, 448kB/s]
1%|▎ | 480k/66.1M [00:01<02:20, 466kB/s]
1%|▎ | 611k/66.1M [00:01<01:53, 577kB/s]
1%|▍ | 710k/66.1M [00:01<01:50, 590kB/s]
1%|▍ | 792k/66.1M [00:01<01:55, 566kB/s]
1%|▌ | 857k/66.1M [00:01<02:06, 518kB/s]
1%|▌ | 939k/66.1M [00:02<02:08, 509kB/s]
2%|▌ | 1.00M/66.1M [00:02<02:15, 480kB/s]
2%|▌ | 1.09M/66.1M [00:02<02:13, 488kB/s]
2%|▋ | 1.18M/66.1M [00:02<02:03, 527kB/s]
2%|▋ | 1.28M/66.1M [00:02<01:57, 554kB/s]
2%|▊ | 1.36M/66.1M [00:02<01:59, 542kB/s]
2%|▊ | 1.51M/66.1M [00:03<01:38, 657kB/s]
2%|▉ | 1.64M/66.1M [00:03<01:31, 705kB/s]
3%|█ | 1.76M/66.1M [00:03<01:30, 709kB/s]
3%|█ | 1.87M/66.1M [00:03<01:30, 712kB/s]
3%|█▏ | 2.00M/66.1M [00:03<01:26, 745kB/s]
3%|█▏ | 2.08M/66.1M [00:03<01:34, 674kB/s]
3%|█▎ | 2.18M/66.1M [00:03<01:37, 657kB/s]
3%|█▎ | 2.26M/66.1M [00:04<01:44, 613kB/s]
4%|█▎ | 2.36M/66.1M [00:04<01:43, 613kB/s]
4%|█▍ | 2.44M/66.1M [00:04<01:49, 583kB/s]
4%|█▍ | 2.54M/66.1M [00:04<01:47, 593kB/s]
4%|█▌ | 2.64M/66.1M [00:04<01:46, 598kB/s]
4%|█▌ | 2.80M/66.1M [00:04<01:27, 725kB/s]
4%|█▋ | 2.88M/66.1M [00:05<01:35, 662kB/s]
5%|█▋ | 3.00M/66.1M [00:05<01:32, 679kB/s]
5%|█▊ | 3.18M/66.1M [00:05<01:17, 813kB/s]
5%|█▉ | 3.28M/66.1M [00:05<01:23, 754kB/s]
5%|█▉ | 3.36M/66.1M [00:05<01:31, 682kB/s]
5%|█▉ | 3.46M/66.1M [00:05<01:34, 663kB/s]
5%|██ | 3.54M/66.1M [00:06<01:41, 618kB/s]
6%|██ | 3.64M/66.1M [00:06<01:41, 618kB/s]
6%|██▏ | 3.75M/66.1M [00:06<01:36, 646kB/s]
6%|██▏ | 3.83M/66.1M [00:06<01:42, 606kB/s]
6%|██▎ | 3.93M/66.1M [00:06<01:42, 609kB/s]
6%|██▎ | 4.05M/66.1M [00:06<01:37, 638kB/s]
6%|██▎ | 4.13M/66.1M [00:07<01:43, 601kB/s]
6%|██▍ | 4.26M/66.1M [00:07<01:33, 664kB/s]
7%|██▌ | 4.36M/66.1M [00:07<01:35, 650kB/s]
7%|██▌ | 4.45M/66.1M [00:07<01:36, 640kB/s]
7%|██▌ | 4.54M/66.1M [00:07<01:42, 603kB/s]
7%|██▋ | 4.63M/66.1M [00:07<01:41, 606kB/s]
7%|██▋ | 4.75M/66.1M [00:07<01:36, 639kB/s]
7%|██▊ | 4.86M/66.1M [00:08<01:32, 662kB/s]
7%|██▊ | 4.94M/66.1M [00:08<01:39, 617kB/s]
8%|██▉ | 5.03M/66.1M [00:08<01:44, 586kB/s]
8%|██▉ | 5.13M/66.1M [00:08<01:42, 596kB/s]
8%|███ | 5.24M/66.1M [00:08<01:36, 632kB/s]
8%|███ | 5.34M/66.1M [00:08<01:37, 623kB/s]
8%|███▏ | 5.45M/66.1M [00:09<01:34, 642kB/s]
8%|███▏ | 5.57M/66.1M [00:09<01:31, 662kB/s]
9%|███▎ | 5.66M/66.1M [00:09<01:33, 649kB/s]
9%|███▎ | 5.75M/66.1M [00:09<01:39, 609kB/s]
9%|███▎ | 5.84M/66.1M [00:09<01:38, 609kB/s]
9%|███▍ | 5.93M/66.1M [00:09<01:43, 580kB/s]
9%|███▍ | 6.07M/66.1M [00:10<01:27, 683kB/s]
9%|███▌ | 6.19M/66.1M [00:10<01:26, 694kB/s]
10%|███▌ | 6.29M/66.1M [00:10<01:29, 671kB/s]
10%|███▋ | 6.37M/66.1M [00:10<01:36, 622kB/s]
10%|███▋ | 6.51M/66.1M [00:10<01:23, 713kB/s]
10%|███▊ | 6.60M/66.1M [00:10<01:31, 653kB/s]
10%|███▊ | 6.71M/66.1M [00:11<01:31, 646kB/s]
10%|███▉ | 6.91M/66.1M [00:11<01:13, 809kB/s]
11%|████ | 7.04M/66.1M [00:11<01:12, 813kB/s]
11%|████ | 7.12M/66.1M [00:11<01:21, 725kB/s]
11%|████▏ | 7.20M/66.1M [00:11<01:28, 662kB/s]
11%|████▏ | 7.30M/66.1M [00:11<01:30, 649kB/s]
11%|████▎ | 7.41M/66.1M [00:12<01:27, 668kB/s]
11%|████▎ | 7.50M/66.1M [00:12<01:34, 623kB/s]
11%|████▎ | 7.58M/66.1M [00:12<01:39, 590kB/s]
12%|████▍ | 7.71M/66.1M [00:12<01:28, 659kB/s]
12%|████▍ | 7.81M/66.1M [00:12<01:30, 647kB/s]
12%|████▌ | 7.92M/66.1M [00:12<01:27, 667kB/s]
12%|████▌ | 8.04M/66.1M [00:12<01:25, 683kB/s]
12%|████▋ | 8.13M/66.1M [00:13<01:28, 656kB/s]
12%|████▋ | 8.22M/66.1M [00:13<01:34, 611kB/s]
13%|████▊ | 8.33M/66.1M [00:13<01:29, 643kB/s]
13%|████▊ | 8.43M/66.1M [00:13<01:31, 633kB/s]
13%|████▉ | 8.51M/66.1M [00:13<01:36, 598kB/s]
13%|████▉ | 8.62M/66.1M [00:13<01:30, 634kB/s]
13%|█████ | 8.74M/66.1M [00:14<01:27, 659kB/s]
13%|█████ | 8.87M/66.1M [00:14<01:20, 708kB/s]
14%|█████▏ | 8.97M/66.1M [00:14<01:24, 678kB/s]
14%|█████▏ | 9.08M/66.1M [00:14<01:22, 690kB/s]
14%|█████▎ | 9.15M/66.1M [00:14<01:32, 614kB/s]
14%|█████▎ | 9.23M/66.1M [00:14<01:38, 576kB/s]
14%|█████▎ | 9.33M/66.1M [00:15<01:36, 589kB/s]
14%|█████▍ | 9.43M/66.1M [00:15<01:34, 597kB/s]
14%|█████▍ | 9.52M/66.1M [00:15<01:35, 594kB/s]
15%|█████▌ | 9.61M/66.1M [00:15<01:39, 570kB/s]
15%|█████▌ | 9.75M/66.1M [00:15<01:23, 673kB/s]
15%|█████▋ | 9.83M/66.1M [00:15<01:29, 626kB/s]
15%|█████▋ | 9.93M/66.1M [00:16<01:30, 623kB/s]
15%|█████▊ | 10.0M/66.1M [00:16<01:35, 589kB/s]
15%|█████▊ | 10.1M/66.1M [00:16<01:38, 566kB/s]
15%|█████▉ | 10.2M/66.1M [00:16<01:22, 674kB/s]
16%|█████▉ | 10.3M/66.1M [00:16<01:24, 657kB/s]
16%|██████ | 10.4M/66.1M [00:16<01:26, 644kB/s]
16%|██████ | 10.5M/66.1M [00:16<01:27, 634kB/s]
16%|██████ | 10.6M/66.1M [00:17<01:32, 598kB/s]
16%|██████▏ | 10.7M/66.1M [00:17<01:31, 604kB/s]
16%|██████▏ | 10.8M/66.1M [00:17<01:30, 608kB/s]
17%|██████▎ | 10.9M/66.1M [00:17<01:30, 611kB/s]
17%|██████▎ | 11.0M/66.1M [00:17<02:13, 412kB/s]
17%|██████▎ | 11.0M/66.1M [00:18<02:22, 387kB/s]
17%|██████▍ | 11.1M/66.1M [00:18<02:10, 421kB/s]
17%|██████▍ | 11.2M/66.1M [00:18<02:04, 441kB/s]
17%|██████▍ | 11.3M/66.1M [00:18<01:54, 481kB/s]
17%|██████▌ | 11.4M/66.1M [00:18<01:45, 520kB/s]
17%|██████▌ | 11.5M/66.1M [00:18<01:39, 548kB/s]
18%|██████▋ | 11.6M/66.1M [00:19<01:27, 626kB/s]
18%|██████▊ | 11.8M/66.1M [00:19<01:10, 775kB/s]
18%|██████▊ | 11.9M/66.1M [00:19<01:14, 728kB/s]
18%|██████▉ | 12.0M/66.1M [00:19<01:08, 787kB/s]
18%|██████▉ | 12.1M/66.1M [00:19<01:10, 760kB/s]
19%|███████ | 12.2M/66.1M [00:19<01:15, 717kB/s]
19%|███████ | 12.3M/66.1M [00:20<01:22, 654kB/s]
19%|███████▏ | 12.5M/66.1M [00:20<01:17, 696kB/s]
19%|███████▏ | 12.6M/66.1M [00:20<01:13, 732kB/s]
19%|███████▎ | 12.7M/66.1M [00:20<01:16, 696kB/s]
19%|███████▍ | 12.8M/66.1M [00:20<01:10, 760kB/s]
20%|███████▍ | 13.0M/66.1M [00:20<01:01, 870kB/s]
20%|███████▌ | 13.1M/66.1M [00:20<01:06, 794kB/s]
20%|███████▌ | 13.2M/66.1M [00:21<01:11, 739kB/s]
20%|███████▋ | 13.3M/66.1M [00:21<01:11, 733kB/s]
20%|███████▋ | 13.4M/66.1M [00:21<01:15, 698kB/s]
21%|███████▊ | 13.6M/66.1M [00:21<01:11, 735kB/s]
21%|███████▊ | 13.7M/66.1M [00:21<01:11, 731kB/s]
21%|███████▉ | 13.8M/66.1M [00:21<01:15, 695kB/s]
21%|███████▉ | 13.9M/66.1M [00:22<01:17, 672kB/s]
21%|████████ | 14.0M/66.1M [00:22<01:12, 717kB/s]
21%|████████ | 14.1M/66.1M [00:22<01:20, 647kB/s]
22%|████████ | 14.5M/66.1M [00:22<00:42, 1.22MB/s]
23%|████████▌ | 15.3M/66.1M [00:22<00:22, 2.30MB/s]
25%|█████████▍ | 16.9M/66.1M [00:22<00:10, 4.62MB/s]
29%|██████████▊ | 19.2M/66.1M [00:23<00:06, 7.61MB/s]
32%|███████████▊ | 21.1M/66.1M [00:23<00:05, 8.83MB/s]
33%|████████████▎ | 22.0M/66.1M [00:23<00:05, 7.67MB/s]
34%|████████████▋ | 22.8M/66.1M [00:23<00:08, 5.30MB/s]
35%|█████████████ | 23.4M/66.1M [00:23<00:08, 4.92MB/s]
36%|█████████████▍ | 23.9M/66.1M [00:24<00:09, 4.51MB/s]
37%|█████████████▋ | 24.4M/66.1M [00:24<00:10, 4.12MB/s]
38%|█████████████▉ | 24.8M/66.1M [00:24<00:11, 3.72MB/s]
38%|██████████████ | 25.2M/66.1M [00:24<00:12, 3.34MB/s]
39%|██████████████▎ | 25.5M/66.1M [00:24<00:13, 2.98MB/s]
39%|██████████████▍ | 25.9M/66.1M [00:24<00:14, 2.76MB/s]
40%|██████████████▋ | 26.3M/66.1M [00:24<00:14, 2.72MB/s]
40%|██████████████▉ | 26.6M/66.1M [00:25<00:17, 2.24MB/s]
41%|███████████████ | 26.9M/66.1M [00:25<00:18, 2.09MB/s]
41%|███████████████▎ | 27.3M/66.1M [00:25<00:17, 2.28MB/s]
42%|███████████████▌ | 27.8M/66.1M [00:25<00:15, 2.51MB/s]
43%|███████████████▋ | 28.1M/66.1M [00:25<00:15, 2.37MB/s]
43%|███████████████▉ | 28.4M/66.1M [00:25<00:17, 2.16MB/s]
44%|████████████████▏ | 28.8M/66.1M [00:26<00:16, 2.31MB/s]
44%|████████████████▍ | 29.3M/66.1M [00:26<00:14, 2.53MB/s]
45%|████████████████▋ | 29.7M/66.1M [00:26<00:13, 2.60MB/s]
46%|████████████████▉ | 30.2M/66.1M [00:26<00:13, 2.71MB/s]
46%|█████████████████▏ | 30.6M/66.1M [00:26<00:13, 2.67MB/s]
49%|█████████████████▉ | 32.1M/66.1M [00:26<00:06, 5.18MB/s]
52%|███████████████████▍ | 34.7M/66.1M [00:27<00:03, 8.77MB/s]
58%|█████████████████████▌ | 38.5M/66.1M [00:27<00:02, 13.6MB/s]
64%|███████████████████████▋ | 42.3M/66.1M [00:27<00:01, 16.9MB/s]
69%|█████████████████████████▍ | 45.5M/66.1M [00:27<00:01, 17.8MB/s]
71%|██████████████████████████▍ | 47.2M/66.1M [00:27<00:01, 12.0MB/s]
74%|███████████████████████████▏ | 48.6M/66.1M [00:28<00:02, 6.41MB/s]
75%|███████████████████████████▊ | 49.7M/66.1M [00:28<00:03, 5.46MB/s]
76%|████████████████████████████▎ | 50.5M/66.1M [00:29<00:03, 4.63MB/s]
77%|████████████████████████████▋ | 51.2M/66.1M [00:29<00:03, 3.82MB/s]
78%|████████████████████████████▉ | 51.7M/66.1M [00:29<00:03, 3.72MB/s]
79%|█████████████████████████████▏ | 52.2M/66.1M [00:29<00:03, 3.56MB/s]
80%|█████████████████████████████▍ | 52.6M/66.1M [00:29<00:04, 3.34MB/s]
80%|█████████████████████████████▋ | 52.9M/66.1M [00:30<00:04, 3.09MB/s]
81%|█████████████████████████████▊ | 53.3M/66.1M [00:30<00:04, 2.83MB/s]
81%|█████████████████████████████▉ | 53.5M/66.1M [00:30<00:04, 2.56MB/s]
82%|██████████████████████████████▏ | 53.9M/66.1M [00:30<00:05, 2.43MB/s]
82%|██████████████████████████████▍ | 54.3M/66.1M [00:30<00:04, 2.49MB/s]
83%|██████████████████████████████▌ | 54.6M/66.1M [00:30<00:04, 2.37MB/s]
83%|██████████████████████████████▋ | 54.9M/66.1M [00:31<00:05, 2.19MB/s]
84%|██████████████████████████████▉ | 55.3M/66.1M [00:31<00:04, 2.26MB/s]
84%|███████████████████████████████▏ | 55.7M/66.1M [00:31<00:04, 2.29MB/s]
85%|███████████████████████████████▍ | 56.1M/66.1M [00:31<00:04, 2.40MB/s]
86%|███████████████████████████████▋ | 56.6M/66.1M [00:31<00:03, 2.48MB/s]
86%|███████████████████████████████▉ | 57.0M/66.1M [00:31<00:03, 2.53MB/s]
87%|████████████████████████████████▏ | 57.4M/66.1M [00:32<00:03, 2.57MB/s]
87%|████████████████████████████████▎ | 57.8M/66.1M [00:32<00:03, 2.57MB/s]
88%|████████████████████████████████▋ | 58.3M/66.1M [00:32<00:02, 2.66MB/s]
89%|████████████████████████████████▉ | 58.7M/66.1M [00:32<00:02, 2.69MB/s]
90%|█████████████████████████████████ | 59.2M/66.1M [00:32<00:02, 2.72MB/s]
90%|█████████████████████████████████▎ | 59.6M/66.1M [00:32<00:02, 2.70MB/s]
91%|█████████████████████████████████▌ | 60.0M/66.1M [00:32<00:02, 2.72MB/s]
91%|█████████████████████████████████▊ | 60.3M/66.1M [00:33<00:03, 1.58MB/s]
92%|█████████████████████████████████▉ | 60.7M/66.1M [00:33<00:03, 1.73MB/s]
92%|██████████████████████████████████▏ | 61.1M/66.1M [00:33<00:02, 1.93MB/s]
93%|██████████████████████████████████▍ | 61.5M/66.1M [00:33<00:02, 2.09MB/s]
94%|██████████████████████████████████▋ | 61.9M/66.1M [00:34<00:01, 2.22MB/s]
94%|██████████████████████████████████▊ | 62.2M/66.1M [00:34<00:01, 2.17MB/s]
95%|███████████████████████████████████ | 62.6M/66.1M [00:34<00:01, 2.28MB/s]
95%|███████████████████████████████████▎ | 63.1M/66.1M [00:34<00:01, 2.39MB/s]
96%|███████████████████████████████████▍ | 63.4M/66.1M [00:34<00:01, 2.24MB/s]
96%|███████████████████████████████████▋ | 63.8M/66.1M [00:34<00:00, 2.36MB/s]
97%|███████████████████████████████████▉ | 64.1M/66.1M [00:35<00:00, 2.33MB/s]
98%|████████████████████████████████████▏| 64.6M/66.1M [00:35<00:00, 2.46MB/s]
0%| | 0.00/66.1M [00:00<?, ?B/s]
100%|██████████████████████████████████████| 66.1M/66.1M [00:00<00:00, 417GB/s]
import hyperspy.api as hs
s = hs.load("coreloss_spectrum.msa", signal_type="EELS")
low_loss = hs.load("lowloss_spectrum.msa", signal_type="EELS")
s.add_elements(("Mn", "O"))
s.set_microscope_parameters(
beam_energy=300, convergence_angle=24.6, collection_angle=13.6
)
m = s.create_model(low_loss=low_loss)
m.enable_fine_structure()
m.multifit(kind="smart")
m.plot()
# one can also use the Dirac GOS by specifying the GOS parameter
m = s.create_model(low_loss=low_loss, GOS="dirac")
m.enable_fine_structure()
m.multifit(kind="smart")
m.plot()
Total running time of the script: (1 minutes 20.200 seconds)