This file contains 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 os | |
import sys | |
import tqdm | |
import hdf5plugin | |
import h5py | |
def extract(nxs, template, start=None, end=None): |
This file contains 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
#include <vector> | |
int dispersion_filter(std::vector<uint16_t> &image_in, | |
std::vector<uint16_t> &mask_out, | |
int NY, int NX) { | |
int32_t knl = 3; | |
float sigma_b = 6.0f, sigma_s = 3.0f; | |
std::vector<uint32_t> im(NY * NX); |
This file contains 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
# to get to the starting point: | |
# | |
# dials.import ~/data/i04_bag_training/*gz | |
# dials.find_spots imported.expt | |
# dials.index imported.expt strong.refl | |
# dials.refine indexed.* | |
# dials.predict refined.expt | |
# | |
# then | |
# |
This file contains 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
# Proof of work is computing the sha1 hash of the uncompressed and unshuffled | |
# data and comparing with the result of doing the operation on the h5py | |
# extracted data | |
import binascii | |
import hashlib | |
import struct | |
import sys | |
import lz4.block |
This file contains 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 sys | |
import os | |
import numpy as np | |
from PIL import Image, ImageFont, ImageDraw | |
import cv2 | |
def main(file_template, start, end): | |
font = ImageFont.truetype("FreeMono.ttf", 32) |
This file contains 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 random | |
# FIXME fill in numbers of each unique piece here | |
tiles = { | |
"a": 10, | |
"b": 10, | |
"c": 10, | |
"d": 10, | |
"e": 10, |
This file contains 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
# Print reciprocal space positions from DIALS strong reflections | |
# after spot finding | |
# | |
# Usage: | |
# | |
# dials.import (data) | |
# dials.find_spots imported.expt | |
# dials.python reciprocal_xyz.py strong.refl imported.expt | |
# | |
# Prints long list of x, y, z positions |
This file contains 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
/home/graeme/git/rp2040-explore/asm/blink/build/blink.elf: file format elf32-littlearm | |
Sections: | |
Idx Name Size VMA LMA File off Algn | |
0 .boot2 00000100 10000000 10000000 00001000 2**0 | |
CONTENTS, ALLOC, LOAD, READONLY, CODE | |
1 .text 00001fd0 10000100 10000100 00001100 2**4 | |
CONTENTS, ALLOC, LOAD, READONLY, CODE | |
2 .rodata 000000b8 100020d0 100020d0 000030d0 2**2 |
This file contains 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
for filename in ins11_b200_1_000001.h5 ins11_b200_1_master.h5 ins11_b200_1_meta.h5 ins11_b200_1.nxs ins11_b295_1_000001.h5 ins11_b295_1_master.h5 ins11_b295_1_meta.h5 ins11_b295_1.nxs ins11_b299_1_000001.h5 ins11_b299_1_master.h5 ins11_b299_1_meta.h5 ins11_b299_1.nxs ins11_b302_1_000001.h5 ins11_b302_1_master.h5 ins11_b302_1_meta.h5 ins11_b302_1.nxs ins11_b365_1_000001.h5 ins11_b365_1_master.h5 ins11_b365_1_meta.h5 ins11_b365_1.nxs ins11_b391_1_000001.h5 ins11_b391_1_master.h5 ins11_b391_1_meta.h5 ins11_b391_1.nxs ins11_b453_1_000001.h5 ins11_b453_1_master.h5 ins11_b453_1_meta.h5 ins11_b453_1.nxs ins11_b474_1_000001.h5 ins11_b474_1_master.h5 ins11_b474_1_meta.h5 ins11_b474_1.nxs ins11_b487_1_000001.h5 ins11_b487_1_master.h5 ins11_b487_1_meta.h5 ins11_b487_1.nxs ins11_b508_1_000001.h5 ins11_b508_1_master.h5 ins11_b508_1_meta.h5 ins11_b508_1.nxs ins11_b566_1_000001.h5 ins11_b566_1_master.h5 ins11_b566_1_meta.h5 ins11_b566_1.nxs ins11_b616_1_000001.h5 ins11_b616_1_master.h5 ins11_b616_1_meta.h5 ins11_b616_1.nxs |
This file contains 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 sys | |
import os | |
import numpy as np | |
from PIL import Image, ImageFont, ImageDraw | |
import cv2 | |
def main(file_template, start=0, end=100000): |
NewerOlder