Skip to content

Instantly share code, notes, and snippets.

View CJ-Wright's full-sized avatar

Christopher J. 'CJ' Wright CJ-Wright

View GitHub Profile

Keybase proof

I hereby claim:

  • I am cj-wright on github.
  • I am cjwright (https://keybase.io/cjwright) on keybase.
  • I have a public key ASBd28WaK-s4q8tuUZZOBZC0b9SbDrK6KPQ0Z05b7gDvKAo

To claim this, I am signing this object:

import os
from conda_build import api
from conda_build.config import Config
from json import dumps
from rever.tools import hash_url
def pp(jason):
print(dumps(jason, indent=4, sort_keys=True))
def main():
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import jinja2
from rever.tools import hash_url
def render_url(name, version, org=''):
if org:
a = 'https://github.com/{{ org }}/{{ name }}/releases/download/{{version}}/{{ version }}.tar.gz'
else:
a = 'https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz'
gt = jinja2.Template(a)
if org:
import bluesky.plans as bp
import bluesky.plan_stubs as bps
from bluesky.utils import Msg, short_uid as _short_uid
from bluesky.preprocessors import subs_wrapper
from bluesky.simulators import summarize_plan
from bluesky.callbacks import LiveTable
from xpdacq.xpdacq_conf import xpd_configuration
from xpdacq.xpdacq import glbl, CustomizedRunEngine
from xpdacq.beamtime import _configure_area_det
def light_dark_nd_step(detectors, step, pos_cache):
"""
Inner loop of an N-dimensional step scan
This is the default function for ``per_step`` param`` in ND plans.
Parameters
----------
detectors : iterable
devices to read
step : dict
mapping motors to positions in this step
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CJ-Wright
CJ-Wright / customized_per_step.py
Last active July 16, 2018 20:36 — forked from chiahaoliu/customized_per_step.py
customized per_step to collect light and dark frames at each motor point
# ACQ SIDE
# ======================================================
import bluesky.plans as bp
import bluesky.plan_stubs as bps
from bluesky.utils import Msg, short_uid as _short_uid
from bluesky.preprocessors import subs_wrapper
from bluesky.simulators import summarize_plan
from bluesky.callbacks import LiveTable
from xpdacq.xpdacq_conf import xpd_configuration
from xpdacq.xpdacq import glbl, CustomizedRunEngine
def filter_positions():
filters = ['flt1', 'flt2', 'flt3', 'flt4']
return {k: getattr(fb, k).value, for k in filters}
#Author: Christopher J. Wright
# Modified by Shuyue
# Hashing out "bad keys" that generare errors. Checked that they are not functional and that they don't exist in rcParams. There are also many other keys here that aren't doing anything in the test figures so far. We need to check the newst rcParam sheet. The figure.dpi setting is useful.
lines.linestyle : -
lines.marker : None
# lines.linewidth : 2.0
# lines.markersize : 5
lines.linewidth : 1.5 # manuscripture
lines.markersize : 5.3 # manuscripture