Skip to content

Commit 7661155

Browse files
author
Joshua Taillon
committed
Some rearranging and renaming
1 parent c25833d commit 7661155

File tree

9 files changed

+568
-276
lines changed

9 files changed

+568
-276
lines changed

notebooks/02 HyperSpy basics/02 Getting_Started.ipynb

Lines changed: 93 additions & 134 deletions
Large diffs are not rendered by default.

notebooks/02 HyperSpy basics/02 Getting_Started-to_complete.ipynb renamed to notebooks/02 HyperSpy basics/02 Getting_Started_completed.ipynb

Lines changed: 134 additions & 93 deletions
Large diffs are not rendered by default.

notebooks/08 Big data/08 Lazy.ipynb

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@
116116
"metadata": {},
117117
"outputs": [],
118118
"source": [
119-
"# Open the preferences GUI and set the logging level to INFO\n",
120-
"hs.preferences.gui()"
119+
"# Open the preferences GUI and set the logging level to INFO\n"
121120
]
122121
},
123122
{
@@ -133,8 +132,7 @@
133132
"metadata": {},
134133
"outputs": [],
135134
"source": [
136-
"# Open lazily the file \"lazy_demo_data_hyperspy_chunking.hspy\" in the subfolder \"lazy\":\n",
137-
"s = hs.load(\"lazy/lazy_demo_data_hyperspy_chunking.hspy\", lazy=True)"
135+
"# Open lazily the file \"lazy_demo_data_hyperspy_chunking.hspy\" in the subfolder \"lazy\":\n"
138136
]
139137
},
140138
{
@@ -196,7 +194,7 @@
196194
"outputs": [],
197195
"source": [
198196
"# Plot the `s` signal by setting \"slider\" to the parameter `navigator`:\n",
199-
"s.plot(navigator=\"slider\")"
197+
"s = "
200198
]
201199
},
202200
{
@@ -325,7 +323,7 @@
325323
"metadata": {},
326324
"outputs": [],
327325
"source": [
328-
"im.plot(navigator=\"slider\")"
326+
"# Plot the `im` signal by setting \"slider\" to the parameter `navigator`:\n"
329327
]
330328
},
331329
{
@@ -355,7 +353,7 @@
355353
"outputs": [],
356354
"source": [
357355
"# Calculate the sum over the navigation axes using the `sum` method of `im`:\n",
358-
"s_navigator = im.sum()"
356+
"s_navigator = "
359357
]
360358
},
361359
{
@@ -389,10 +387,7 @@
389387
"metadata": {},
390388
"outputs": [],
391389
"source": [
392-
"# The same for `im_navigator`:\n",
393-
"im_navigator = s.sum()\n",
394-
"# Compute the lazy signal `im_navigator`\n",
395-
"im_navigator.compute()"
390+
"# Compute the lazy signal `s_navigator`\n"
396391
]
397392
},
398393
{
@@ -420,9 +415,8 @@
420415
"outputs": [],
421416
"source": [
422417
"# Do the same for `im_navigator`:\n",
423-
"im_navigator = s.sum()\n",
424-
"# Compute the lazy signal `im_navigator`\n",
425-
"im_navigator.compute()"
418+
"im_navigator = \n",
419+
"# Compute the lazy signal `im_navigator`\n"
426420
]
427421
},
428422
{
@@ -438,8 +432,7 @@
438432
"metadata": {},
439433
"outputs": [],
440434
"source": [
441-
"# plot the `s` lazy signal using the `s_navigator` as navigator\n",
442-
"s.plot(navigator=s_navigator)"
435+
"# plot the `s` lazy signal using the `s_navigator` as navigator\n"
443436
]
444437
},
445438
{
@@ -448,8 +441,7 @@
448441
"metadata": {},
449442
"outputs": [],
450443
"source": [
451-
"# plot the `im` lazy signal using the `im_navigator` as navigator\n",
452-
"im.plot(navigator=im_navigator)"
444+
"# plot the `im` lazy signal using the `im_navigator` as navigator\n"
453445
]
454446
},
455447
{
@@ -520,7 +512,7 @@
520512
"outputs": [],
521513
"source": [
522514
"# Rebin the signal dimention to 128x128 using the `rebin` method (you may need to check the documentation of `rebin`)\n",
523-
"srb = im.rebin((4096, 128, 128))"
515+
"srb = "
524516
]
525517
},
526518
{
@@ -529,8 +521,7 @@
529521
"metadata": {},
530522
"outputs": [],
531523
"source": [
532-
"# Call `compute` to perform the computation\n",
533-
"srb.compute()"
524+
"# Call `compute` to perform the computation\n"
534525
]
535526
},
536527
{
@@ -546,8 +537,7 @@
546537
"metadata": {},
547538
"outputs": [],
548539
"source": [
549-
"# Plot the result, which have been computed and is now in memory\n",
550-
"srb.plot()"
540+
"# Plot the result, which have been computed and is now in memory\n"
551541
]
552542
},
553543
{
@@ -563,8 +553,7 @@
563553
"metadata": {},
564554
"outputs": [],
565555
"source": [
566-
"# Plot `s` with precomputed navigator image `s_navigator`\n",
567-
"s.plot(navigator=s_navigator)"
556+
"# Plot `s` with precomputed navigator image `s_navigator`\n"
568557
]
569558
},
570559
{
@@ -581,7 +570,7 @@
581570
"outputs": [],
582571
"source": [
583572
"# Create a RectangularROI defined by the position (left=100, top=100, right=110, bottom=110)\n",
584-
"s_roi = hs.roi.RectangularROI(left=100, top=100, right=110, bottom=110)"
573+
"s_roi = "
585574
]
586575
},
587576
{
@@ -607,7 +596,7 @@
607596
"metadata": {},
608597
"outputs": [],
609598
"source": [
610-
"# Call the ROI from a signal:\n",
599+
"# Call the ROI from the signal `s`:\n",
611600
"print(s_roi(s))"
612601
]
613602
},
@@ -624,8 +613,7 @@
624613
"metadata": {},
625614
"outputs": [],
626615
"source": [
627-
"# Call the `gui` method of the ROI to display the widget:\n",
628-
"s_roi.gui()"
616+
"# Call the `gui` method of the ROI to display the widget:\n"
629617
]
630618
},
631619
{
@@ -651,8 +639,7 @@
651639
"metadata": {},
652640
"outputs": [],
653641
"source": [
654-
"# Add the ROI to the signal using the `add_widget` method of the roi:\n",
655-
"w = s_roi.add_widget(s)"
642+
"# Add the ROI to the signal using the `add_widget` method of the roi:\n"
656643
]
657644
},
658645
{

notebooks/08 Big data/08 Lazy-to_complete.ipynb renamed to notebooks/08 Big data/08 Lazy_completed.ipynb

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@
116116
"metadata": {},
117117
"outputs": [],
118118
"source": [
119-
"# Open the preferences GUI and set the logging level to INFO\n"
119+
"# Open the preferences GUI and set the logging level to INFO\n",
120+
"hs.preferences.gui()"
120121
]
121122
},
122123
{
@@ -132,7 +133,8 @@
132133
"metadata": {},
133134
"outputs": [],
134135
"source": [
135-
"# Open lazily the file \"lazy_demo_data_hyperspy_chunking.hspy\" in the subfolder \"lazy\":\n"
136+
"# Open lazily the file \"lazy_demo_data_hyperspy_chunking.hspy\" in the subfolder \"lazy\":\n",
137+
"s = hs.load(\"lazy/lazy_demo_data_hyperspy_chunking.hspy\", lazy=True)"
136138
]
137139
},
138140
{
@@ -194,7 +196,7 @@
194196
"outputs": [],
195197
"source": [
196198
"# Plot the `s` signal by setting \"slider\" to the parameter `navigator`:\n",
197-
"s = "
199+
"s.plot(navigator=\"slider\")"
198200
]
199201
},
200202
{
@@ -323,7 +325,7 @@
323325
"metadata": {},
324326
"outputs": [],
325327
"source": [
326-
"# Plot the `im` signal by setting \"slider\" to the parameter `navigator`:\n"
328+
"im.plot(navigator=\"slider\")"
327329
]
328330
},
329331
{
@@ -353,7 +355,7 @@
353355
"outputs": [],
354356
"source": [
355357
"# Calculate the sum over the navigation axes using the `sum` method of `im`:\n",
356-
"s_navigator = "
358+
"s_navigator = im.sum()"
357359
]
358360
},
359361
{
@@ -387,7 +389,10 @@
387389
"metadata": {},
388390
"outputs": [],
389391
"source": [
390-
"# Compute the lazy signal `s_navigator`\n"
392+
"# The same for `im_navigator`:\n",
393+
"im_navigator = s.sum()\n",
394+
"# Compute the lazy signal `im_navigator`\n",
395+
"im_navigator.compute()"
391396
]
392397
},
393398
{
@@ -415,8 +420,9 @@
415420
"outputs": [],
416421
"source": [
417422
"# Do the same for `im_navigator`:\n",
418-
"im_navigator = \n",
419-
"# Compute the lazy signal `im_navigator`\n"
423+
"im_navigator = s.sum()\n",
424+
"# Compute the lazy signal `im_navigator`\n",
425+
"im_navigator.compute()"
420426
]
421427
},
422428
{
@@ -432,7 +438,8 @@
432438
"metadata": {},
433439
"outputs": [],
434440
"source": [
435-
"# plot the `s` lazy signal using the `s_navigator` as navigator\n"
441+
"# plot the `s` lazy signal using the `s_navigator` as navigator\n",
442+
"s.plot(navigator=s_navigator)"
436443
]
437444
},
438445
{
@@ -441,7 +448,8 @@
441448
"metadata": {},
442449
"outputs": [],
443450
"source": [
444-
"# plot the `im` lazy signal using the `im_navigator` as navigator\n"
451+
"# plot the `im` lazy signal using the `im_navigator` as navigator\n",
452+
"im.plot(navigator=im_navigator)"
445453
]
446454
},
447455
{
@@ -512,7 +520,7 @@
512520
"outputs": [],
513521
"source": [
514522
"# Rebin the signal dimention to 128x128 using the `rebin` method (you may need to check the documentation of `rebin`)\n",
515-
"srb = "
523+
"srb = im.rebin((4096, 128, 128))"
516524
]
517525
},
518526
{
@@ -521,7 +529,8 @@
521529
"metadata": {},
522530
"outputs": [],
523531
"source": [
524-
"# Call `compute` to perform the computation\n"
532+
"# Call `compute` to perform the computation\n",
533+
"srb.compute()"
525534
]
526535
},
527536
{
@@ -537,7 +546,8 @@
537546
"metadata": {},
538547
"outputs": [],
539548
"source": [
540-
"# Plot the result, which have been computed and is now in memory\n"
549+
"# Plot the result, which have been computed and is now in memory\n",
550+
"srb.plot()"
541551
]
542552
},
543553
{
@@ -553,7 +563,8 @@
553563
"metadata": {},
554564
"outputs": [],
555565
"source": [
556-
"# Plot `s` with precomputed navigator image `s_navigator`\n"
566+
"# Plot `s` with precomputed navigator image `s_navigator`\n",
567+
"s.plot(navigator=s_navigator)"
557568
]
558569
},
559570
{
@@ -570,7 +581,7 @@
570581
"outputs": [],
571582
"source": [
572583
"# Create a RectangularROI defined by the position (left=100, top=100, right=110, bottom=110)\n",
573-
"s_roi = "
584+
"s_roi = hs.roi.RectangularROI(left=100, top=100, right=110, bottom=110)"
574585
]
575586
},
576587
{
@@ -596,7 +607,7 @@
596607
"metadata": {},
597608
"outputs": [],
598609
"source": [
599-
"# Call the ROI from the signal `s`:\n",
610+
"# Call the ROI from a signal:\n",
600611
"print(s_roi(s))"
601612
]
602613
},
@@ -613,7 +624,8 @@
613624
"metadata": {},
614625
"outputs": [],
615626
"source": [
616-
"# Call the `gui` method of the ROI to display the widget:\n"
627+
"# Call the `gui` method of the ROI to display the widget:\n",
628+
"s_roi.gui()"
617629
]
618630
},
619631
{
@@ -639,7 +651,8 @@
639651
"metadata": {},
640652
"outputs": [],
641653
"source": [
642-
"# Add the ROI to the signal using the `add_widget` method of the roi:\n"
654+
"# Add the ROI to the signal using the `add_widget` method of the roi:\n",
655+
"w = s_roi.add_widget(s)"
643656
]
644657
},
645658
{

notebooks/09 Parallel sessions/09a Introduction to Atomap.ipynb renamed to notebooks/09 Parallel sessions/09a Atomap/09a Introduction to Atomap.ipynb

File renamed without changes.

0 commit comments

Comments
 (0)