This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'Hello Thomas - edit PATH using "profile"' | |
alias ls="ls --color" | |
alias cd..='cd ../' # Go back 1 directory level (for fast typers) | |
alias cd...='cd ../../' | |
alias ..='cd ../' # Go back 1 directory level | |
alias ...='cd ../../' # Go back 2 directory levels | |
alias .3='cd ../../../' # Go back 3 directory levels | |
alias .4='cd ../../../../' # Go back 4 directory levels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Python script to load any format supported by hyperspy directly into GMS | |
Must be copied and pasted into Gatan DigitalMicrograph (aka Gatan Microscopy Suite) version 3.4+ | |
Call by `load_img(filepath)` at the bottom of the script. Can not be called outside of GMS. | |
Does not automatically convert the data type to EELS or EDS | |
Written by Thomas Aarholt, see https://gist.github.com/thomasaarholt/fccf06d56ff84cf76345b44dae30871e for newer versions | |
Feedback and forks are very welcome. | |
MUST: First import of hyperspy (or scipy) must NOT be run with "Execute on background thread" checked. One | |
can then swap to background thread and rerun. | |
v. 0.3: Added delete statements to ensure python objects don't stay in memory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
from collections import defaultdict | |
from os import path | |
from typing import DefaultDict, List, NamedTuple, Optional, Sequence, Set, Tuple, cast | |
import requests | |
import re | |
from copy import copy | |
from pyrsistent import m, s, v, PMap, PSet, PVector |
OlderNewer