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
| %pylab inline | |
| import hyperspy.api as hs | |
| from statsmodels.nonparametric.smoothers_lowess import lowess | |
| def DespikeEELS(spec, m=3., interp_outliers=True): | |
| # Make a copy of the data | |
| E = spec.axes_manager[0].axis.copy() | |
| I = spec.data.copy() | |
| # Lowess smooth. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 skimage.exposure import rescale_intensity, equalize_hist | |
| def MakeRGBFromMaps(R,G,B, bits=16): | |
| MaxPixelVal = (2**bits)-1 | |
| # Make a Signal2D from the three images and copy over the metadata. | |
| x = hs.stack([R,G,B]) | |
| x = hs.signals.Signal2D(x).T | |
| x.metadata = R.metadata | |
| x.original_metadata = R.original_metadata | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| " Vundle install | |
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " let Vundle manage Vundle, required | |
| Plugin 'VundleVim/Vundle.vim' |
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
| import numpy as np | |
| import sys | |
| if len(sys.argv) < 3: | |
| print('Command line format:\npython 2bin.py stackin.npy stackout.npy') | |
| sys.exit() | |
| s = np.load(sys.argv[1]) | |
| if len(s.shape) != 3: | |
| print('Input npy stack needs to have a shape like (x, y, frames).') |
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
| #.tmux.conf | |
| # Make mouse useful in copy mode | |
| set -g mode-mouse on | |
| set -g mouse-select-window on | |
| set -g mouse-select-pane on | |
| set -g mouse-resize-pane on |
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
| #!/bin/bash | |
| tmux new-session -d -s ZackG | |
| tmux new-window -t ZackG:1 -n 'lrc' | |
| tmux send-keys "watch 'sacct --format JobID,jobname%20,NCPUS,State,Submit,AveRSS,CPUTime,Elapsed,TimeLimit,NodeList | tac'" C-m | |
| tmux split-window -h -t lrc | |
| tmux select-pane -t 0 | |
| tmux split-window -v -t lrc | |
| tmux select-pane -t 2 | |
| tmux attach-session -t ZackG |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.