Skip to content

Instantly share code, notes, and snippets.

View danielballan's full-sized avatar

Dan Allan danielballan

View GitHub Profile

Owners - Tech Steering Committee

Repos

area-detector-handlers

  • Dan Allan
  • Garrett Bischof
  • Maksim Rakitin
  • Jakob Wlodek
@danielballan
danielballan / databroker-migration-guide.md
Last active September 22, 2022 20:46
Databroker Migration Guide

Databroker Migration Guide

What?

This is a draft of a guide for migrating from Databroker v1.x to Databroker v2.x (currently in prerelease). The data storage does not change; only the way it is accessed changes. It is possible to run Databroker v1.x and 2.x against the same MongoDB concurrently. Databroker 1.x was effectively a plugin to Intake. Databroker 2.x refactors Databroker as a plugin to Tiled, and drops any depenedency on Intake.

@danielballan
danielballan / README.md
Last active June 9, 2022 18:32
FastAPI, Pydantic, and OpenAPI with recursive models
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danielballan
danielballan / .flake8
Last active March 28, 2022 15:58
Store and search tomographic reconstructions with Tiled
[flake8]
max-line-length = 115
@danielballan
danielballan / example.md
Created February 17, 2022 22:29
FXI example data access

Example using public CC0-licensed FXI data

In this example, we connect to a public HTTP server and download raw tomography images.

It is not necessary to use Python to do this---curl would work fine---but the Tiled Python client is currently the most convenient way to do navigate the data.

pip install tiled[client]
@danielballan
danielballan / README.md
Created August 6, 2021 21:18
Bluesky Widgets Demo Quickstart

Bluesky Widgets Demo Quickstart

@danielballan
danielballan / README.md
Created July 17, 2021 18:09
MVP for Qt RemoteDispatcher

Terminal 1:

bluesky-0MQ-proxy 5567 5568

Terminal 2:

python publisher.py
@danielballan
danielballan / camera_device.py
Last active July 4, 2021 18:43
BMM camera ophyd integration
import os
import uuid
import threading
import itertools
import requests
from ophyd import Device, Component, Signal, DeviceStatus
from ophyd.areadetector.filestore_mixins import resource_factory
# See for resource_factory docstring