diff --git a/docs/_images/Bnc_map.png b/docs/_images/Bnc_map.png new file mode 100644 index 0000000..66ea4bb Binary files /dev/null and b/docs/_images/Bnc_map.png differ diff --git a/docs/_images/Calibration_111.png b/docs/_images/Calibration_111.png new file mode 100644 index 0000000..df885c5 Binary files /dev/null and b/docs/_images/Calibration_111.png differ diff --git a/docs/_images/DM3_first_cat6.jpg b/docs/_images/DM3_first_cat6.jpg new file mode 100644 index 0000000..cdf9e1f Binary files /dev/null and b/docs/_images/DM3_first_cat6.jpg differ diff --git a/docs/_images/DM3_patch_panel.jpg b/docs/_images/DM3_patch_panel.jpg new file mode 100644 index 0000000..1db2a03 Binary files /dev/null and b/docs/_images/DM3_patch_panel.jpg differ diff --git a/docs/_images/Gas_handling.png b/docs/_images/Gas_handling.png new file mode 100644 index 0000000..2b44019 Binary files /dev/null and b/docs/_images/Gas_handling.png differ diff --git a/docs/_images/Kill_switch_connector.png b/docs/_images/Kill_switch_connector.png new file mode 100644 index 0000000..f7d123d Binary files /dev/null and b/docs/_images/Kill_switch_connector.png differ diff --git a/docs/_images/Logitech.png b/docs/_images/Logitech.png new file mode 100644 index 0000000..bac06ac Binary files /dev/null and b/docs/_images/Logitech.png differ diff --git a/docs/_images/Vortex_pressure.jpeg b/docs/_images/Vortex_pressure.jpeg new file mode 100644 index 0000000..3ee658d Binary files /dev/null and b/docs/_images/Vortex_pressure.jpeg differ diff --git a/docs/_images/Water_flow_CSS.png b/docs/_images/Water_flow_CSS.png new file mode 100644 index 0000000..0d8ff16 Binary files /dev/null and b/docs/_images/Water_flow_CSS.png differ diff --git a/docs/_images/Water_flow_valves_1.jpg b/docs/_images/Water_flow_valves_1.jpg new file mode 100644 index 0000000..400fe61 Binary files /dev/null and b/docs/_images/Water_flow_valves_1.jpg differ diff --git a/docs/_images/Water_flow_valves_2.jpg b/docs/_images/Water_flow_valves_2.jpg new file mode 100644 index 0000000..72394a4 Binary files /dev/null and b/docs/_images/Water_flow_valves_2.jpg differ diff --git a/docs/_images/Winvm_startup.png b/docs/_images/Winvm_startup.png new file mode 100644 index 0000000..60da217 Binary files /dev/null and b/docs/_images/Winvm_startup.png differ diff --git a/docs/_static/Binder-instructions.pdf b/docs/_static/Binder-instructions.pdf new file mode 100644 index 0000000..fba78da Binary files /dev/null and b/docs/_static/Binder-instructions.pdf differ diff --git a/docs/conf.py b/docs/conf.py index 80b3ee8..21df779 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,10 +37,13 @@ 'sphinx.ext.todo', ] extensions.extend([#'fix_equation_ref', - 'sphinx_subfigure', 'numsec', 'figtable', - 'singlehtml_toc', 'singletext', 'demeterdocs', 'appendix', + 'sphinx_subfigure', 'numsec', 'figtable', + 'singlehtml_toc', 'singletext', 'demeterdocs', 'appendix', + 'sphinxcontrib.bibtex' ]) +bibtex_bibfiles = ['references.bib'] + mathjax3_config = { 'tex2jax': { 'inlineMath': [ ["\\(","\\)"] ], diff --git a/docs/details.rst b/docs/details.rst new file mode 100644 index 0000000..931647e --- /dev/null +++ b/docs/details.rst @@ -0,0 +1,347 @@ +.. + This document was developed primarily by a NIST employee. Pursuant + to title 17 United States Code Section 105, works of NIST employees + are not subject to copyright protection in the United States. Thus + this repository may not be licensed under the same terms as Bluesky + itself. + + See the LICENSE file for details. + +.. _details: + +Instrumentation Details +======================= + +This section is a scattershot assortment of details about things at +the beamline. This is basically an attempt to capture institutional +knowledge ... someplace. + +BNC Cable Map +------------- + +Here is an explanation of the BNC and SHV patch panels going between +rack D at the control station, Rack C on the roof of the hutch, and +the in-hutch patch panel. + + +.. _fig-bncpatch: +.. figure:: _images/Bnc_map.png + :target: _images/Bnc_map.png + :width: 100% + :align: center + +Inert Gas Plumbing +------------------ + +Needle valves are mounted on the outboard side of DM3. Quick connect +outlets for the gases are mounted on the upstream/inboard corner of +the XAFS table. + +.. _fig-inertgas: +.. figure:: _images/Gas_handling.png + :target: _images/Gas_handling.png + :width: 100% + :align: center + +Vendor link for quick-disconnect fixture: https://www.mcmaster.com/5012K122/ + + + +Analog Video Capture +-------------------- + +Implementing `this USB video adapter +`__ +to capture video from the small analog cameras in the hutch took a bit +of doing. + +First, the adapter must be plugged directly into the computer. Using +a USB hub makes for an unreliable interface to the camera. + +Second, the file ``/etc/udev/rules.d/99-usb-camera-capture.rules`` is +needed to set permissions on ``/dev/video0`` correctly when the adapter is +plugged in. + +.. code-block:: none + + ACTION!="add|change", GOTO="webcam_capture_end" + SUBSYSTEM=="usb", ATTRS{idVendor}=="534d", ATTRS{idProduct}=="0021", MODE="0666" + KERNEL=="video*", ATTRS{idVendor}=="534d", ATTRS{idProduct}=="0021", GROUP="video", MODE="0666" + KERNEL=="video*", ATTRS{idVendor}=="534d", ATTRS{idProduct}=="0021", ATTRS{avoid_reset_quirk}=1 + KERNEL=="video*", ATTRS{idVendor}=="534d", ATTRS{idProduct}=="0021", ATTRS{quirks}=0x100 + LABEL="webcam_capture_end" + +Putting this file in place will require assistance from DSSI. Beamline +staff do not have permission to make a file in that folder. See `this +Jira ticket `__ for an +example of what to ask for. + +This recognizes the vendor and product IDs of the specific adapter +that I bought. When inserted, it sets the device to RW for all users +and sets a couple of possibly relevant attributes. (This udev rules +file was adapted from the rules file that comes with the easycap dc60 +package – info and links `here +`__). + +Next a small function was written as a wrapper around `fswebcam +`__ to grab frames from the +camera. The function is basically a wrapper around a call to +``fswebcam`` like so: + +.. code-block:: sh + + fswebcam -d /dev/video0 -r 640x480 -S 30 -F 5 foo.jpg + +along with some image processing using python's ``wand`` package. + +Required packages: + ++ ``fswebcam`` ++ ``python-wand`` ++ ``imagemagick`` + +This whole setup is filled with quirk. There is a delay accessing the +video capture. The ``-S`` switch builds in a 1 second delay, giving the +capture device enough time to begin displaying the image. The ``-F`` +switch tells the script how many frames to accumulate for good signal. +5 is probably overkill. + +In any case, it is now possible to grab screen shots of the currently +displayed analog video while collecting data. + +All of this is implemented in ``BMM/camera_device.py`` for use in +Bluesky. The heart of the implementation is a system call to +``fswebcam``. From there, the image is saved as an asset and correctly +pointed to in databroker. See: + ++ https://github.com/NSLS-II-BMM/profile_collection/blob/master/startup/BMM/user_ns/detectors.py#L253 ++ https://github.com/NSLS-II-BMM/profile_collection/blob/master/startup/BMM/camera_device.py#L62-L164 + + +DI Water Flow +------------- + +The DI water is controled by manual valves, which should only be +operated by the utilities group, and by solenoid valves in the FOE. +The solenoid valves are triggered by a water-sensing strip along the +floor of the FOE. They are also actuated by switches on the CSS +utilities screen. These toggles are the ones circled in pink inthe +screenshot on the left. + +The valves themselves are the large yellow and black boxes mounted +high on the back wall of the FOE. The valve indicators are the rods +with orange markings. When the valves are open, the orange marks are +facing downstream. When closed, the orange marks are rotated towards +the wall. Opening and closing those valves is managed through CSS. +They must be open for the utilities group to do their work on the DI +delivery to the mono and the filter assemblies. + +.. subfigure:: ABC + :layout-sm: ABC + :gap: 8px + :subcaptions: above + :name: fig-diwater + :class-grid: outline + + .. image:: _images/Water_flow_CSS.png + + .. image:: _images/Water_flow_valves_1.jpg + + .. image:: _images/Water_flow_valves_2.jpg + + (Left) The CSS utilities screen where the water valve controls are + found. (Middle) A view into the FOE. (Right) The inboard wall + where the physical valve is found. + +Disabling an MCS8 axis after a move +----------------------------------- + +From Adam Young at FMBO +~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: none + + The motors can be disabled after a movement and this can be set at the + Delta Tau level. + + First you will need to connect to each MCS8+ with the beamline laptop + and start PEWin. + + Then please do the following: + + + Click on the 'View' menu at the top of the window. Then click + 'Program/PLC Status (and upload)'. + + Select PLC1 and click 'Upload'. An editor showing PLC1 will appear. + + Scroll down to find the variables P105 to P805. The '1' to '8' part + of these variables represent axis 1 to 8 on the MCS8+. The value of + these variables determines whether or not the motors will be + disabled after a move. They are likely all set to '0' meaning power + stays on. The lateral motors are on axis 4 and 5 so P405 and P505 + should be set to '1'. + + Click on the yellow downwards pointing arrow on the toolbar in the + editor. This downloads the modified PLC1 from the editor to the + Delta Tau. Close the editor. + + In the terminal window issue a 'save' to save the modified + configuration to the Delta Tau non-volatile memory and issue '$$$' + to refresh the controller. + +A follow up from Graeme Elliner, FMBO +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: none + + Just done a fast scan of the config file and I think it is probably + because P302=1. + + Px02 and Px05 (where x is the motor number) are special Pvars for + setting the final state of the motor once it has stopped moving, they + are used in PLC1x and set as you know in PLC1 + + If Px02=1 the PLC to check if the motor is in position and its + desired velocity is zero, if these two conditions are set a Flag is + set, If the conditions are still met 1second later then the motor + is put into OPEN LOOP. This means the motor is still enabled but + will ignore the encoder and the motor will hold its current rotary + location. This is useful for the motors that have DPTs pushing + against them in flexures (trapezoidal roll and pitch assy on the + DCMs), it gives a firm base for the DPT to push against but will + not try to hold position (as it would in closed loop) when the DPT + pushes the top part of the stage and moves the encoder. If Px05=1 + then the PLC checks to see if the motor is in position and has zero + velocity, then 1second later it will kill that motor + + Due to the way the code is ordered (it looks for thePx02 first) it + will enter Px02 check first, when the conditions are met it will + set the first Flag After that check it then see the Px05 check and + kills the motor. However on the next pass through the PLC it will + again enter the Px02 check, see that the first flag has been set + then trigger the open loop command, re-enabling the motor. + + Hence by setting P302=0 in PLC1, it will not go into the check and + not accidentally enable the motor. If this does not fix it then + the issue is in EPICS + +Conclusion +~~~~~~~~~~ + +The above suggestions were done for ``dm3_bct``, a motor that was +showing the re-enable behavior. This made that motor tricky to +operate in bluesky. Setting ``P302=0`` and ``P305=1`` did the trick. + + +Vortex pressure +--------------- + +Using a probe to measure the voltage on the IP port of the Vortex ME4. +This reading will tell you the internal pressure according to the +table in the snapshot below. + +.. _fig-votexpressure: +.. figure:: _images/Vortex_pressure.jpeg + :target: _images/Vortex_pressure.jpeg + :width: 40% + :align: center + + +====================== ========== + IP reading (Voltage) Pressure +====================== ========== + -0.01 5E-9 + -0.1 5E-8 + -1 5E-7 + -10 5E-6 +====================== ========== + + +Temperature reading should be 1.5 V when the TEC is at proper +temperature. + +`Vortex SDD manual +`__ +(link to copy at APS detector pool). + +DM3 CAT6 Patch Panel +-------------------- + +13 more CAT6 ports for use in the hutch. Note that ports listed as +SCI/EPICS are tagged ports on both subnets. + +This is needed by workstations (like ``xf06bm-ws5``), display machines +running CSS (like ``xf06bm-disp1``), and machines running IOCs (like +``xf06bm-xspress3``). + +Note that ``xf06bm-em1`` needs to be on an INST port while the ion +chambers are on EPICS ports. The difference is that the ion chambers +are running their own on-board IOCs, making them more like IOC servers +than instruments. + + + + ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| **Patch** | **Port** | **xf06bm-a port** | **Network** | **Role** | **Cable number** | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| **DM3-A** | 1 | 44 | EPICS | xf06bm-ic1 | 200235 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 2 | 45 | EPICS | xf06bm-ic2 | 200236 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 3 | 46 | EPICS | xf06bm-ic3 | 200237 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 4 | 06bm-agg 36 | INST | xf06bm-em1 | 200238 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| **DM3-B** | 1 | 17 | SCI/EPICS | xf06bm-ws5 | 200239 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 2 | 18 | SCI/EPICS | xf06bm-disp1 | 200240 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 3 | 19 | SCI/EPICS | xf06bm-xspress3 | 200241 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 4 | | SCI/EPICS | | 200242 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| **DM3-C** | 1 | | | | 200243 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 2 | | | | 200244 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 3 | | | | 200245 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 4 | | | | 200246 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| **DM3-D** | 1 | | | | 200247 | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 2 | | | unused | | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 3 | | | unused | | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ +| | 4 | | | unused | | ++-----------+----------+--------------------+----------------+---------------------+-------------------+ + + +Some photos of the patch panel: + +.. subfigure:: AB + :layout-sm: AB + :gap: 8px + :subcaptions: above + :name: fig-dm3cat6 + :class-grid: outline + + .. image:: _images/DM3_patch_panel.jpg + + .. image:: _images/DM3_first_cat6.jpg + + (Left) CAT6 patch panel at DM3. (Right) Lowest numbered label on + the CAT6 cables in the DM3 patch panel + + +Logitech controller +------------------- + +.. _fig-logitech: +.. figure:: _images/Logitech.png + :target: _images/Logitech.png + :width: 100% + :align: center + + +.. todo:: + + Explain how to configure buttons in CSS diff --git a/docs/index.rst b/docs/index.rst index 69b79a5..426a2cf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -41,4 +41,5 @@ BMM is NIST's Beamline for Materials Measurement profile.rst plotting.rst ionchambers.rst + details.rst todo.rst diff --git a/docs/manage.rst b/docs/manage.rst index 3f1c24d..54607c0 100644 --- a/docs/manage.rst +++ b/docs/manage.rst @@ -323,34 +323,203 @@ Several things to note: #. Also, you still need to set up the photon delivery system up by hand. -Examine Motor Axes ------------------- -Some BlueSky functionality related to the axes controlled by the FMBO -MCS8 motor controllers. These include: +Motor controller kill switches +------------------------------ + +The MCS8 motor controllers supplied by FMBO have a kill switch for +power cycling the Phytron amplifier cards. This is implemented by the +vendor as connector plugged into the back of the chassis which shorts +the two leads of the receptacle. To kill the amplifiers, this plug is +removed and reinserted. + +That's fine, but the motor controllers are on top of the FOE |nd| not +a convenient location. + +The new kill switch system uses DIODE to close the kill switch +circuit. Two-conductor cable is run from each motor controller to a +remote DIODE box mounted on the inboard wall of the end station. + +The Bluesky interface is defined `here +`__ + + + +From the docstring of the class: + +.. code-block:: none + + A simple interface to the DIODE kill switches for the Phytron + amplifiers on the FMBO Delta Tau motor controllers. + + In the BMM DIODE box, these are implemented on channels 0 to 4 of + slot 4. + + attributes + ---------- + dcm + kill switch for MC02, monochromator + slits2 + kill switch for MC03, DM2 slits + m2 + kill switch for MC04, focusing mirror + m3 + kill switch for MC05, harmonic rejection mirror + dm3 + kill switch for MC06, hutch slits and diagnostics -+ Collimating mirror (``m1_*``) -+ Filter assemblies (``dm1_*``) -+ Monochromator (``dcm_*``) -+ Second diagnostic module (``dm2_*``) -+ Focusing mirror (``m2_*``) -+ Harmonic rejection mirror (``m3_*``) -+ Third diagnostic module (``dm3_*``) + methods + ------- + kill(mc) + disable Phytron + enable(mc) + activate Phytron + cycle(mc) + disable, wait 5 seconds, reactivate, then re-enable all motors -(38 axes motors in total) but not any of the end station motors -(``xafs_*``), which are run using NSLS-II standard GeoBricks. + Specify the motor controller as a string, i.e. 'dcm', 'slits2', 'm2', 'm3', 'dm3' + + Here is a common problem which is resolved using a kill switch. + + BMM E.111 [36] ▶ RE(mvr(m2.pitch, 0.05)) + INFO:BMM_logger: Moving m2_pitch to 2.550 + + Moving m2_pitch to 2.550 + ERROR:ophyd.objects:Motion failed: m2_yu is in an alarm state status=AlarmStatus.STATE severity=AlarmSeverity.MAJOR + ERROR:ophyd.objects:Motion failed: m2_yu is in an alarm state status=AlarmStatus.STATE severity=AlarmSeverity.MAJOR + ERROR:ophyd.objects:Motion failed: m2_ydi is in an alarm state status=AlarmStatus.STATE severity=AlarmSeverity.MAJOR + ERROR:ophyd.objects:Motion failed: m2_ydi is in an alarm state status=AlarmStatus.STATE severity=AlarmSeverity.MAJOR + Out[36]: () + + This is telling you that the amplifiers for two of the M2 jacks + went into an alarm state. In the vast majority of cases, this + simply requires killing and reactivating those amplifiers. + + The solution to this one is: + + BMM E.111 [1] ▶ ks.cycle('m2') + Cycling amplifiers on m2 motor controller + killing amplifiers + reactivating amplifiers + enabling motors + + +Old kill switch system +~~~~~~~~~~~~~~~~~~~~~~ + +There is a row of switches on rack D, the rack next to the control +station, that are used to disable the amplifiers for the MCS8 motor +controllers. The cabling for this system still exists, but is not +plugged into the controllers. Should the DIODE system somehow fail, +this can be redeployed easily. + + +.. _fig-killswitches: +.. figure:: _images/Kill_switches.jpg + :target: _images/Kill_switches.jpg + :width: 70% + :align: center -**Homing** - Any of these axes can be homed with, for example, ``dm3_bct.home()`` + The manual kill switch system -**Summarize the status of a motor** - To show the values of all the status flags, for example, ``dm3_bct.status()`` -**Which motors have been homed?** - Do this command: ``homed()`` +When you suspect that a motor has an amplifier fault, toggle the +appropriate switch to the off position. Wait 10 seconds (to be very +safe...). Then toggle the switch back to the on position. The motor +should be ready to go. These switches replace the shorted plugs that +came attached to the "disable" port on the back side of the MCS8s. -**Which motors have their amplifiers enabled?** - Do this command: ``ampen()`` +======= ========================== =============================== ================================= + MCS8 RGA label RGD label motors +======= ========================== =============================== ================================= + MC02 6BM-100149-RG:A1-PT1B3-A 6BM-100149-RG:A1-PT1B3-B DCM + MC03 6BM-100150-RG:A1-PT1B3-A 6BM-100150-RG:A1-PT1B3-B slits2 + MC04 6BM-100151-RG:A1-PT1B3-A 6BM-100151-RG:A1-PT1B3-B M2 + DM2 FS + MC05 6BM-100152-RG:A1-PT1B3-A 6BM-100152-RG:A1-PT1B3-B M3 + Filters + MC06 DM3 (bct,bpm,fs,foils)+ Slits3 +======= ========================== =============================== ================================= + +In the situation where toggling the switch does not clear the +amplifier fault, the next troubleshooting step is to power cycle the +MCS8. This is done by toggling the red, illuminated switch on the +front of the MCS8. Wait for the red amplifier lights to stop +flickering after turning off the MCS8, then turn the MCS8 back on. + +After power cycling the MCS8, it is necessary to re-home all the +motors controlled by the MCS8. + + +MCS8 Connector +~~~~~~~~~~~~~~ + +The disable plug on the back of the MCS8 controllers is a Binder RS +connector, part number 468-885. `Here's an +example. `__ + +And here is the wiring diagram. Short the prongs on the opposite side +of the alignment groove. + +.. _fig-killswitcheconnector: +.. figure:: _images/Kill_switch_connector.png + :target: _images/Kill_switch_connector.png + :width: 30% + :align: center + +Tutorial for how to put together the Binder connectors: :download:`PDF <_static/Binder-instructions.pdf>` + + + +Windows VM and BioLogic +----------------------- + +We use the `BioLogic EC_lab software +`__ to run +the `VSP-300 potentiostat +`__. Since there is not a +dedicated Windows machine at BMM, EC-Lab is run on a virtual machine +that is spun up when needed. Here are the instructions for starting +and interacting with the the VM. + +Starting the virtual machine +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++ At a command line, do ``rdesktop xf06bm-srv2`` ++ This will open a new window and display a Windows login + screen. Normal credentials do not work. Log in as xf06bm using the + password provided by beamline staff. ++ The Windows desktop will start with a full-screen management + application that looks like the figure below. You can close + or minimize that window. ++ Double-click on the EC-lab icon. ++ Start doing electrochemistry. ++ Save your data to the Echem folder on the Windows desktop. In that + folder you will find a folder with the name of the PI for the + experiment. In that, you will find a folder with the start dat of + the experiment. Save your data in that folder. + +.. _fig-winvm: +.. figure:: _images/Winvm_startup.png + :target: _images/Winvm_startup.png + :width: 70% + :align: center + + VM management window. You can minimize or close this. + +Transferring echem data +~~~~~~~~~~~~~~~~~~~~~~~ + +The VM is on the INST network, thus data must be transferred to a +machine on the INST network. This means an IOC server needs to be used +for data transfer. Here is how this can be done using the bravel +account. + ++ Open a CMD window on the VM ++ cd to the location of the current user's Echem data ++ do something like ``scp * bravel@10.68.42.26:/nsls2/users/bravel/temp_folder`` ++ on IOC2, zip up the temp_folder and transfer the file to the xf06bm + user via the ``/tmp/`` folder. + +Obviously, this needs streamlining. Calibrate the mono @@ -360,6 +529,10 @@ The typical calibration procedure involves measuring the angular position of the Bragg axis for the edge energies of 10 metals: Fe, Co, Ni, Cu, Zn, Pt, Au, Pb, Nb, and Mo. +The tabulated values of edge energies from :cite:t:`Kraft1998` are +used in the calibration. + + #. Be sure that all 10 of these elements are actually mounted on the reference wheel and configured in the ``xafs_ref.mapping`` dict. (They should be. It would be very unusual for any of these foils @@ -393,8 +566,9 @@ Ni, Cu, Zn, Pt, Au, Pb, Nb, and Mo. .. todo:: - Implement on-the-fly determination of E0 to obviate the step of - editing the INI file. Pb is tricky. Nb and Mo are kind of tricky. + Implement on-the-fly determination of E\ :sub:`0` to obviate the + step of editing the INI file. Pb is tricky. Nb and Mo are kind + of tricky. .. @@ -415,6 +589,15 @@ Ni, Cu, Zn, Pt, Au, Pb, Nb, and Mo. instructions for modifying the :file:`BMM/dcm-parameters.py` file to use the new calibration values. + .. _fig-calibrate: + .. figure:: _images/Calibration_111.png + :target: _images/Calibration_111.png + :width: 70% + :align: center + + Example calibration curve + + #. Edit :file:`BMM/dcm-parameters.py` as indicated. #. Do @@ -429,17 +612,22 @@ Ni, Cu, Zn, Pt, Au, Pb, Nb, and Mo. dcm.set_crystal() - Or simply restart bsui, which is usually the easiest thing. + Or simply restart ``bsui``, which is usually the easier thing. #. Finally, do - .. code-block:: python calibrate_pitch(mono='111') - and use the fitted slope and offset to modify ``approximate_pitch`` - in :file:`BMM/functions.py`. + This performs a simple linear fit to the rocking curve peak + positions for ``dcm_pitch`` found at each edge. Use the fitted + slope and offset to modify ``approximate_pitch`` in + :file:`BMM/functions.py`. The mono should now be correctly calibrated using the new calibration parameters. + +---- + +.. bibliography:: diff --git a/docs/motors.rst b/docs/motors.rst index 582dd54..39a9d0a 100644 --- a/docs/motors.rst +++ b/docs/motors.rst @@ -401,3 +401,32 @@ The lateral table motors |nd| and its yaw |nd| are normally disabled. All table movements are recorded in the :numref:`experimental log (Section %s) `. + +Examine Motor Axes +------------------ + +Some BlueSky functionality related to the axes controlled by the FMBO +MCS8 motor controllers. These include: + ++ Collimating mirror (``m1_*``) ++ Filter assemblies (``dm1_*``) ++ Monochromator (``dcm_*``) ++ Second diagnostic module (``dm2_*``) ++ Focusing mirror (``m2_*``) ++ Harmonic rejection mirror (``m3_*``) ++ Third diagnostic module (``dm3_*``) + +(38 axes motors in total) but not any of the end station motors +(``xafs_*``), which are run using NSLS-II standard GeoBricks. + +**Homing** + Any of these axes can be homed with, for example, ``dm3_bct.home()`` + +**Summarize the status of a motor** + To show the values of all the status flags, for example, ``dm3_bct.status()`` + +**Which motors have been homed?** + Do this command: ``homed()`` + +**Which motors have their amplifiers enabled?** + Do this command: ``ampen()`` diff --git a/docs/references.bib b/docs/references.bib new file mode 100644 index 0000000..56eaf74 --- /dev/null +++ b/docs/references.bib @@ -0,0 +1,14 @@ + + + +@Article{Kraft1998, + author = {S. Kraft and J. Stümpel and P. Becker and U. Kuetgens}, + title = {High resolution x‐ray absorption spectroscopy with + absolute energy calibration for the determination of + absorption edge energies}, + journal = {Review of Scientific Instruments}, + year = 1998, + volume = 67, + pages = 681, + doi = {10.1063/1.1146657} +}