Skip to content

Commit

Permalink
minor editing
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceravel committed Nov 2, 2023
1 parent 63d2e4f commit 78e51ca
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 73 deletions.
15 changes: 10 additions & 5 deletions docs/instruments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ photons, this versatility of setup is occasionally very helpful.
silicon drift detector.


.. note::
Thanks to funding from the CHIPS Act, BMM is the process of
procuring a new 7-element SDD! Look for that in late 2024 or
early 2025.


Area detector
-------------
Expand Down Expand Up @@ -267,8 +272,8 @@ automated.
The glancing angle stage with 8 sample positions.


While this can be used for standing wave experiments, the much more
typical application is a simple glancing angle measurement in which
the point of the shallow angle is to spread the beam out over the full
length of the sample. This significantly increases the number of
atoms involved in the measurement.
While a standing wave experiment might be feasible at BMM, the much
more typical application is a simple glancing angle measurement in
which the point of the shallow angle is to spread the beam out over
the full length of the sample. This significantly increases the
number of atoms involved in the measurement.
17 changes: 14 additions & 3 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,16 @@ This will create that data folder and populate it with an
write a :numref:`user log file (Section %s) <logfile>` for this
experiment, set the GUP and SAF numbers as metadata for output files,
set up :numref:`snapshot (Section %s) <snap>` and :numref:`dossier
(Section %s) <dossier>` folders, and perfrom other experiment start-up
(Section %s) <dossier>` folders, and perform other experiment start-up
chores.

.. note::

In the near future, the ``start_experiment()`` command will grab
metadata from PASS (or UPS, or whatever) and set access permissions
on data. When that happens, the only argument needed will be the
SAF number.

The ``name`` should be the PI's full name, preferably transliterated
into normal ASCII. The ``date`` should be the starting day of the
experiment in the ``YYYY-MM-DD`` format. The ```GUP`` and ``SAF``
Expand Down Expand Up @@ -411,12 +418,16 @@ from the `The Executable Book Project
BMM's profile was mostly written by Bruce. But this would not have
happened without the help of several members of NSLS-II's DSSI
program. In particular, I want to thank Dan Allan, Tom Caswell, Josh
Lynch, Max Rakitin, Dmitri Gavrilov, and Stuart Campbell
Lynch, Max Rakitin, Dmitri Gavrilov, and Stuart Campbell. And I need
to thank all every BMM user because there is no difference being a BMM
user and being a bug tester for this software!

BMM makes use of `lots of great python tools
<https://speakerdeck.com/jakevdp/the-unexpected-effectiveness-of-python-in-science?slide=52>`__.
Matt Newville's `Larch <http://xraypy.github.io/xraylarch/>`__ is used
to process every XAS scan that gets measured.
to process every XAS scan that gets measured and Matt's `lmfit
<https://lmfit.github.io/lmfit-py/>`__ is used for many alignment
chores.

This project uses a GitHub action to build and deploy `(see details
here)
Expand Down
74 changes: 28 additions & 46 deletions docs/linescans.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,30 @@ In BMM's ``linescan()`` plan, the scan is always a relative scan
around the current position of the motor being scanned. It works like
this::

RE(linescan('it', 'x', -4, 4, 81))
RE(linescan(xafs_x, 'it', -4, 4, 81))

The arguments are:

#. A string indicating the detector for the plotted signal. The
choices are:

* ``it``: display the ratio of ``It/I0``
* ``if``: display the sum of four silicon drift channels normalized
by ``I0``
* ``i0``: display the signal on ``I0``
* ``ir``: display the ratio of ``Ir/I0``
* ``both``: display both ``It/I0`` *and* the sum of four silicon
drift channels normalized by ``I0``

#. The motor axis to be scanned. This can be either the motor's
BlueSky name or the nickname string from :numref:`Table %s
<xafs-stages>`. So, these are equivalent::

RE(linescan('it', 'x', -4, 4, 81))
RE(linescan('it', xafs_x, -4, 4, 81))
RE(linescan('x', 'it', -4, 4, 81))
RE(linescan('xafs', it_x, -4, 4, 81))

For a motor that does not have a nickname, you must use the ophyd
object, as in::
symbol, as in::

RE(linescan('i0', slits3_outboard, -1, 1, 21))
RE(linescan(slits3.outboard, 'i0', -1, 1, 21))

#. A string indicating the detector for the plotted signal. The
choices are:

* ``it``: display the ratio of ``It/I0``
* ``if``: display the sum of four silicon drift channels normalized
by ``I0``
* ``i0``: display the signal on ``I0``
* ``ir``: display the ratio of ``Ir/It``

#. The starting position of the motor scan, relative to the current
position.
Expand All @@ -75,18 +73,6 @@ At the end of the scan, you are prompted with the following question::

Pluck motor position from the plot? [Yn]



..
If you answer :quote:`y` then :button:`Enter`, or simply hit
:button:`Enter`, you will be prompted to single click the left mouse
button :mark:`leftclick,.` on the plot. The motor that was scanned
will then move to the motor position you clicked on.
You can skip the "click for motor position" step by typing
:button:`n` and hitting :button:`Enter`.


If you answer :key:`y` then :key:`Enter`, or simply hit
:key:`Enter`, you will be prompted to single click the left mouse
button :mark:`leftclick,.` on the plot. The motor that was scanned
Expand All @@ -107,16 +93,12 @@ motor to the click-upon point, do::
RE(pluck())

This will enable the left mouse :mark:`leftclick,.` click and
subsequent motion on the most recent plot. The ``pluck()`` command
*only* works on the most recent plot. You may not pluck from an older
plot that is still displayed on the screen.

Of course, an older plot remains active in the sense that you can pass
the cursor over the plot and read the mouse coordinates in the bottom,
left corner of the plot window. You can find a point in this way,
then do a movement command like::
subsequent motion on the most recent plot.

RE(mv(xafs_y, 28.31))
.. warning::
The ``pluck()`` command works on any plot made through the Kafka
plotter. Be sure you are clicking on the plot you intend to pluck
from!


Revisit a line scan
Expand Down Expand Up @@ -182,10 +164,10 @@ arguments that they have special names.

yield from slit_height()

**Align ex situ sample holder**
**Align ex situ sample holder**
If the *ex situ* sample wheel is in approximately the right
position such that X-rays are passing through the slot, you can
center the slot around the beam with::
position such that X-rays are passing through a slot on the outer
ring, you can center the slot around the beam with::

RE(find_slot())

Expand All @@ -207,12 +189,12 @@ Area scans


.. todo:: A raster scan type |nd| i.e. ``RE(raster())`` |nd| that does
an areascan as described here, makes a nice figure using
`matplotlib's contourf
<https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.contourf.html>`_,
exports data in formats used by popular plotting programs,
and writes a dossier was tested in 2022-2. Current status:
dossier is written, scan works, documentation needs to be written.
an areascan as described here, makes a nice figure using
`matplotlib's contourf
<https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.contourf.html>`_,
exports data in formats used by popular plotting programs,
and writes a dossier was tested in 2022-2. Current status:
dossier is written, scan works, documentation needs to be written.


An area scan is a simple scan of a two motor axes with an on-screen
Expand Down
25 changes: 15 additions & 10 deletions docs/motors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,23 @@ are the same for all sample stage motors.
**Querying position**
The position of any motor can be queried with a command line like ::

%w xafs_y
%w xafs_y

or ::

xafs_y.position

**Moving to a new position**
Always move motors through the run engine, for example: ::

RE(mvr(xafs_y, 10))
RE(mvr(xafs_y, 10))

``mvr`` is the relative move command |nd| the numerical argument is
the amount by which the motor will move from the current position.

``mv``, as in::

RE(mv(xafs_y, 37.63))
RE(mv(xafs_y, 37.63))

is the absolute move command. The numerical argument is the
position to which the motor will move.
Expand All @@ -125,9 +129,9 @@ are the same for all sample stage motors.
yield from mvr(xafs_y, 5)

**Querying soft limits**
To know the soft limits on a sample stage, do
``xafs_y.llm.get()`` or ``xafs_y.hlm.get()`` for the low or
high limit.
To know the soft limits on a sample stage, do ``xafs_y.limits`` or
``xafs_y.llm.get()`` or ``xafs_y.hlm.get()`` to query the low or
high limits individually.

**Setting soft limits**
To set the soft limits on a sample stage, do something like
Expand All @@ -148,15 +152,16 @@ are the same for all sample stage motors.

BMM has foils or stable oxides for each of these elements::

Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Zr Nb Mo Pt Au Pb Bi Sr Y
Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Zr Nb Mo Pt Au Pb Bi Sr Y
Cs La Ce Pr Nd Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Rb Ba Hf Ta W Re Os Ir Ru

(A few of these |nd| Ba, Os, Ir |nd| are missing as of 23
December, 2022. We are working to obtain the missing ones.)
(A few of these |nd| Ba, Os, Ir |nd| are missing as of 2
November, 2023. We are working to obtain the missing ones.)

`Here is a complete list of standards
<https://nsls-ii-bmm.github.io/bmm-standards/BMM-standards.html>`__
in BMM's collection.
in BMM's collection. These standards are mounted on sample wheels
and stored in the hutch for ready access by users.


Sample wheel
Expand Down
6 changes: 3 additions & 3 deletions docs/pds.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ facilitating any actions a user should ever need.
dcm.mode = 'channelcut'
In practice, the monochromator is normally left in fixed-exit
mode. That way, the monochromator can be moved without worry about
the beam height and the monochromator exit aperture. In the
In practice, the monochromator is normally left in fixed-exit mode.
That way, the monochromator can be moved without having to worry
about the beam height and the monochromator exit aperture. In the
:numref:`XAFS scan plan (Section %s) <xafsscan>`, the monochromator
first moves |nd| in fixed-exit mode |nd| to the center of the
angular range of the scan, then sets ``dcm.mode`` to
Expand Down
12 changes: 6 additions & 6 deletions docs/xafs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
XAFS scans
==========

The BMM step scan plan starts by editing an `INI file
The simplest access to an XAFS scan starts by editing an `INI file
<https://en.wikipedia.org/wiki/INI_file>`_. This is a simple
keyword/value system where the keyword is separated from the value by
an equals sign and each line contains a single keyword/value pair.
Expand Down Expand Up @@ -645,11 +645,11 @@ INI file.
yield from end_of_macro()
BMM_log_info('Sample macro finished!')

The gray lines at lines 13-16 and 28-30 are comments indicating that
parts of the macro are intended for editing by the user while other
parts are boilerplate that make the macro work correctly. In general,
you only want to edit the lines between those two comment blocks,
leaving the lines above and below untouched.
The commented (by ``#``) lines at lines 13-16 and 28-30 are comments
indicating that parts of the macro are intended for editing by the
user while other parts are boilerplate that make the macro work
correctly. In general, you only want to edit the lines between those
two comment blocks, leaving the lines above and below untouched.

The calls to ``BMM_info()`` at lines 11 and 35 insert lines in the
:numref:`experiment log (Section %s) <log>` indicating the times that
Expand Down

0 comments on commit 78e51ca

Please sign in to comment.