Skip to content

Instantly share code, notes, and snippets.

@NeutralKaon
NeutralKaon / read_dsv.m
Last active August 3, 2023 06:55
A matlab routine for reading Siemens IDEA / POET .dsv pulse sequence directories / files
function out=read_dsv(pathname)
% Read a Siemens IDEA DSV folder as simulated by POET, for subsequent plotting.
% This just parses a pre-existing text file and plonks it into a struct.
%
% Input: a POET-simulated folder containing .dsv files (check your temp
% files in an IDEA VM)
%
% Output: a returned structure containing the parsed contents present.
%
% Should you wish to plot a pulse sequence diagram, you probably want to
@saagarjha
saagarjha / CreateGhidraApp.sh
Last active April 13, 2024 12:35
Creates a Ghidra.app bundle for macOS
#!/bin/sh
set -eu
create_iconset() {
mkdir -p Ghidra.iconset
cat << EOF > Ghidra.iconset/Contents.json
{
"images":
[
anonymous
anonymous / pca_animation.m
Created January 26, 2017 21:47
Matlab code to produce PCA animations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matlab code to produce PCA animations shown here:
% http://stats.stackexchange.com/questions/2691
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Static image
clear all
rng(42)
@adrn
adrn / emcee_mpi_hotfoot.py
Last active September 25, 2023 06:01
run emcee with MPI on Hotfoot
"""
- Hotfoot is Columbia's shared Astronomy-Statistics supercomputing
cluster.
- Emcee is a kick-ass MCMC black-box for sampling probability
distributions & parameter estimation.
- MPI is a standardized message passing system designed for supporting
and running parallel code.
Emcee is an implementation of an affine-invariant, ensemble sampler --
key words here being *ensemple sampler*. The algorithm runs an ensemble