We deploy root-owned conda environments which are the basis of the data collection and analysis environments. On one hand because these are owned by root they are write-protected and ensure that users can not accidentally break the environment, on the other hand because they are write-protected they can not be upgraded or extended. While we want to run with a stable, standard, well understood software environment, we do need this
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 itertools | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.scale as mscale | |
def factory(break_point, slope_ratio): | |
def forward(values): | |
out = np.array(values, copy=True) | |
out -= break_point |
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
from types import SimpleNamespace | |
import matplotlib.image as mimage | |
from matplotlib.patches import Rectangle | |
from matplotlib.backends.backend_agg import RendererAgg | |
import matplotlib.transforms as mtransforms | |
import matplotlib.path as mpath | |
import matplotlib.colors as mcolors | |
import numpy as np | |
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
#! /usr/bin/env python3 | |
_facilities = { | |
"SLAC/ALS": "America/Los_Angeles", | |
"APS": "America/Chicago", | |
"NSLS-II": "America/New_York", | |
"DLS": "Europe/London", | |
"MAXIV": "Europe/Paris", | |
"SLS": "Europe/Paris", |
- explore_pgcam_data.ipynb -> demo of how to pulll reduced data out of the msgpack databroker
- extract.py -> code run on xpd against raw data broker to sort out what raw runs we are interested in
- reprocess.py -> code run to re-process the raw data and produce the reduced outputs
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
from event_model import compose_run | |
import datetime | |
import dateutil.parser | |
import itertools | |
from io import StringIO | |
import subprocess | |
import numpy as np | |
import functools | |
def extract_event(ts, batch): |
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
Python 3.9.0a5+ (heads/master:799d7d61a9, Apr 6 2020, 17:38:49) | |
Type 'copyright', 'credits' or 'license' for more information | |
IPython 8.0.0.dev -- An enhanced Interactive Python. Type '?' for help. | |
In [1]: 1 /0 | |
Traceback (most recent call last): | |
File "/home/tcaswell/.virtualenvs/bleeding/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code | |
exec(code_obj, self.user_global_ns, self.user_ns) | |
File "<ipython-input-1-a37332903225>", line 1, in <module> | |
1 /0 |
This is code to consume processed data from XPD back into document model
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 numpy as np | |
import matplotlib | |
import matplotlib.lines | |
from matplotlib.artist import allow_rasterization | |
import matplotlib.pyplot as plt | |
class MatplotlibException(Exception): | |
... |
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
*.h5 | |
.ipynb_checkpoints/ |
NewerOlder