Skip to content

Commit

Permalink
Added fly-scanning spectroscopy section
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Kiss committed Oct 27, 2022
1 parent ae88b70 commit 39fdc06
Show file tree
Hide file tree
Showing 57 changed files with 25,317 additions and 2,006 deletions.
Binary file modified _build/doctrees/environment.pickle
Binary file not shown.
Binary file modified _build/doctrees/index.doctree
Binary file not shown.
Binary file modified _build/doctrees/intro.doctree
Binary file not shown.
Binary file modified _build/doctrees/staff.doctree
Binary file not shown.
Binary file modified _build/doctrees/useful.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion _build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: f67947b028cdff2c8c251e081f79477e
config: 9e1e264f477b7efdad3c742493da4ad9
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added _build/html/_images/asyn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/axis_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/ivu_scan_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions _build/html/_sources/staff.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,89 @@ Setting up Users
#. Perform beamline specific training. `5-ID BST Form <https://www.bnl.gov/ps/training/Beamline-BST-Forms/PS-BST-5-ID.pdf>`_


Fly-scanning spectroscopy
-------------------------
Fly-scanning spectroscopy is still in beta. Below is some information on how to use this capability.

In order to have coordinated motion, the IVU Delta Tau will take complete control over the motion for the IVU, HDCM Bragg, and HDCM C2X. When a scan is started, the IVU will request control, and when the scan is complete, the IVU will disable control. If the scan is stopped or aborted, this may not clean up properly so it is important to check that control is disabled before moving components in bluesky or CSS.

Check git branch
****************
Check the git branch. Currently (2022-10-26), the fly-scanning spectroscopy is only in the fly-scans branch. You can check the current branch using::

$ git branch
* fly-scans
master

You can change to the fly-scans branch using::

git checkout fly-scans


CSS-Pages
*********
To get to the IVU Scan Mode page, please navigate from |br|
5ID Main -> Insertion Device -> 5 SRX -> IVU 21 Operator Page -> Scan Mode

.. _fig-ivu:
.. figure:: _images/ivu_scan_mode.png
:target: _images/ivu_scan_mode.png
:width: 100%
:align: center

SRX IVU 21 scan mode CSS page.


Bluesky Commands
****************
Run a fly spectroscopy scan. ``num_scans`` is optional. ``scan_type`` can be set to ``uni`` or ``bi`` to determine if the scan will only in one direction or both.::

RE(fly_multiple_passes(e_start, e_stop, e_width, dwell, num_pts,
num_scans=1, scan_type='uni'))

Export scan data.::

export_flyer_id_mono_data(uid_or_scanid)

Recover the bluesky environment from an aborted scan.::

RE(flying_xas_reset())
Debugging
*********
If there is a problem with the scan and it is stopped or aborted, bluesky might not recover properly. A function has been put together to try to recover nicely, where it aborts any scans, disables the IVU control, unstages the flyer, and resets the scaler. If this does not recover the bluesky environment, then bluesky will need to be quit and restarted. The function to recover the environment is ::

RE(flying_xas_reset())

If the HDCM Bragg or C2X motors are not moving, it is good to check if the IVU scan mode is enabled. If the scan mode is enabled and a move is tried from CSS or bluesky, the motor can be put into an alarm state with a following error. On one of the motor pages, such as the SRX Align page, you can see a red box around the motor in alarm. To confirm a following error, you can go from |br|
5ID Main -> HDCM -> <motor> More -> PMAC Axis Status

.. _fig-axis:
.. figure:: _images/axis_status.png
:target: _images/axis_status.png
:width: 70%
:align: center

SRX HDCM Bragg axis page.

To reset the amplifier fault, go to the asyn page to send commands to the motor controller. |br|
5ID Main -> HDCM -> <motor> More -> Asyn -> More -> Asyn Octet Interface I/O

.. _fig-asyn:
.. figure:: _images/asyn.png
:target: _images/asyn.png
:width: 70%
:align: center

SRX HDCM Bragg asyn page.

Check that the IVU control is disabled. Type the following command on the motor's asyn page and hit Enter::

ena plc 6

After executing the command, the alarm will clear after moving the motor.


Beamline Setup
--------------
These tasks are typically done once a cycle.
Expand Down Expand Up @@ -315,3 +398,7 @@ EPS
.. todo::
* Upload wiring diagrams


.. |br| raw:: html

<br>
134 changes: 134 additions & 0 deletions _build/html/_static/_sphinx_javascript_frameworks_compat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/

/**
* select a different prefix for underscore
*/
$u = _.noConflict();


/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};

/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;

/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};

/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};

/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();

var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];

return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
54 changes: 39 additions & 15 deletions _build/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */

div.body {
min-width: 450px;
min-width: 360px;
max-width: 800px;
}

Expand All @@ -237,16 +237,6 @@ a.headerlink {
visibility: hidden;
}

a.brackets:before,
span.brackets > a:before{
content: "[";
}

a.brackets:after,
span.brackets > a:after {
content: "]";
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down Expand Up @@ -334,12 +324,16 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}
nav.contents,
aside.topic,

div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,

div.topic {
border: 1px solid #ccc;
Expand Down Expand Up @@ -379,13 +373,19 @@ div.body p.centered {

div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,

div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,

div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -428,10 +428,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}

table.footnote td, table.footnote th {
border: 0 !important;
}

th {
text-align: left;
padding-right: 5px;
Expand Down Expand Up @@ -615,6 +611,7 @@ ul.simple p {
margin-bottom: 0;
}

/* Docutils 0.17 and older (footnotes & citations) */
dl.footnote > dt,
dl.citation > dt {
float: left;
Expand All @@ -632,6 +629,33 @@ dl.citation > dd:after {
clear: both;
}

/* Docutils 0.18+ (footnotes & citations) */
aside.footnote > span,
div.citation > span {
float: left;
}
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}

/* Footnotes & citations ends */

dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
Expand Down
2 changes: 1 addition & 1 deletion _build/html/_static/css/badge_only.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39fdc06

Please sign in to comment.