The shared Globus endpoint includes one messagepack (*.msgpack
) file per
Bluesky Run. DataBroker can run on top of these filesdirectly, and that's how
we'll start. Alternatively, we can read the contents of these files into
MongoDB to gain better performance and support for more advanced search queries.
We'll address that process at the end. It may or may not be necessary depending
on your needs.
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
def get_scanid_filenames(run): | |
""" | |
Get a bluesky scan_id, unique_id, filename by giveing uid | |
Parameters | |
---------- | |
run: a BlueskyRun | |
Returns | |
------- |
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 python | |
''' | |
Created on Nov 24, 2009 | |
@author: Stuart Campbell - SNS, Oak Ridge National Laboratory | |
''' | |
import nxs | |
import optparse |
I hereby claim:
- I am stuartcampbell on github.
- I am stuartcampbell (https://keybase.io/stuartcampbell) on keybase.
- I have a public key ASDheIEWYXjQVdkWVu9Pjro5XKmXCLwdRrX41GLF77fSogo
To claim this, I am signing this object:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pandas as pd | |
import uuid | |
import time | |
def _parse_athena_header(inp_lines): | |
out = {} | |
for ln in inp_lines: | |
key, sep, val = ln[2:].partition(':') | |
if not sep: | |
continue |
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
// | |
// ascii-data-printer | |
// | |
// Created by Stuart Campbell on 3/9/18. | |
// Copyright © 2018 Stuart Campbell. All rights reserved. | |
// | |
#include <iostream> | |
#include <stdio.h> | |
#include <time.h> |
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
xspress2 set-up "xsp1" $14 $14 $5 $5 0 $ffff $100 $8401 | |
#xspress2 dump-regs "xsp1" -1 | |
tfg generate 1 1 0.01 300 0 | |
clear 0 | |
enable 0 | |
tfg start | |
echo "Starting run ..." | |
tfg wait | |
echo "Stopping run ..." | |
disable 0 |
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 IPython.display import HTML | |
HTML('''<script> | |
code_show=true; | |
function code_toggle() { | |
if (code_show){ | |
$('div.input').hide(); | |
} else { |
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
#! /bin/bash | |
if [ -z "$BS_ENV" ]; then | |
BS_ENV=collection-17Q2.0 | |
fi | |
source /opt/conda/bin/activate $BS_ENV && ipython --profile=collection |
NewerOlder