Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update I24 serial docs #487

Merged
merged 21 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ shell commands pointing to the correct scripts/edm locations.

.. code:: bash

./path/to/mx-bluesky/deploy/deploy_edm_for_ssx.sh
./path/to/mx-bluesky/utility_scripts/deploy/deploy_edm_for_ssx.sh

Setting the current visit directory
===================================
Expand All @@ -37,7 +37,7 @@ point to the current visit and then running the command:

.. code:: bash

./path/to/mx-bluesky/src/mx_bluesky/i24/serial/set_visit_directory.sh
./path/to/mx-bluesky/src/mx_bluesky/beamlines/i24/serial/set_visit_directory.sh

Note that the default experiment type for the script setting the
directory will be ``fixed-target``. In case of an extruder collection,
Expand All @@ -46,4 +46,4 @@ the command line.

.. code:: bash

./path/to/mx-bluesky/src/mx_bluesky/i24/serial/set_visit_directory.sh extruder
./path/to/mx-bluesky/src/mx_bluesky/beamlines/i24/serial/set_visit_directory.sh extruder
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A couple of entry points have been set up so that:

Before opening the experiment specific edm, each of these entry points
will start a ``BlueAPI`` server. The configuration used by ``BlueAPI``
is saved in ``src/mx_bluesky/i24/serial/blueapi_config.yaml``.
is saved in ``src/mx_bluesky/beamlines/i24/serial/blueapi_config.yaml``.

Detector choice
===============
Expand Down Expand Up @@ -54,7 +54,9 @@ into a single sub-directory but split into multiple smaller collections.

For a pump-probe experiment, select ``True`` on the dropdown menu in
``Data Collection Setup`` and then set the laser dwell and delay times
in the ``Pump Probe`` panel. **WARNING** This setting requires an
in the ``Pump Probe`` panel.

**WARNING** This setting requires a
hardware change, as there are only 4 outputs on the zebra and they are
all in use. When using the Eiger the Pilatus trigger cable should be
used to trigger the light source. When using the pilatus the eiger
Expand All @@ -75,7 +77,7 @@ set up the coordinate system.

Before this step remember to reset the scale and skew factors as well as
the motor directions as needed. Current values are saved in
``src/mx_bluesky/i24/serial/parameters/fixed_target`` in the
``src/mx_bluesky/beamlines/i24/serial/parameters/fixed_target`` in the
``cs_maker.json`` and ``motor_direction.txt`` files.

1. From the main edm screen open the ``viewer`` and ``moveonclick``.
Expand Down Expand Up @@ -146,17 +148,15 @@ set the laser dwell and delay times accordingly.
For more details on the pump probe settings see `Dynamics and fixed
targets <https://confluence.diamond.ac.uk/display/MXTech/Dynamics+and+fixed+targets>`__

III - **Save the parameters**

**This step cannot be skipped!**

Once all of the previous steps have been completed - and before running
a collection - all parameters have to be saved using the
``Set parameters`` button so that they can be applied to the collection.
A copy parameter file will be saved along with the chip map (if
applicable) in the data directory at collection time.

IV - **Run a collection**
III - **Run a collection**

Once all parameters have been set, press ``Start`` to run the
collection. A stream log will show what is going on in the terminal.


**NOTE** As of version ``1.0.0``, the ``Set parameters`` button has been removed and
the parameters will now be read from the edm and applied to the collection directly
once the ``Start`` button is pressed. For previous versions however, the button must
still be pressed before starting the collection. A copy of the parameter file and chip
map (if applicable) will still be saved in the data directory at collection time.
Comment on lines +158 to +162
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could: I think docs should usually just reflect the state of things as they currently are rather than as they were. Unless you're worried that the person reading this may be used to the older way of running it?

Copy link
Contributor Author

@noemifrisina noemifrisina Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I agree with just describing the latest version. In this case, I am a bit worried as scientists and users have been used until now to having to press the set parameters button for the collection to work. I think it may be worth leaving the comment for a bit while the staff gets used to it and then remove it at a later time - hopefully by the beginning of next run...

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ in a couple of different ways.

.. code:: python

yield from bps.mv(pmac.x, 0, pmac.y, 1)https://github.com/DiamondLightSource/mx-bluesky/wiki/Serial-Crystallography-on-I24#cs_reset-custom-chips
yield from bps.mv(pmac.x, 0, pmac.y, 1)

Notes on the coordinate system for a fixed-target collection
============================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,125 @@ Roadmap
For a closer look at the ongoing work: `I24ssx
board <https://github.com/orgs/DiamondLightSource/projects/10/views/2>`__

Ongoing list of things needed:

1. Solution for enabling users to run mx-bluesky instead of old scripts:
blocked by permission issues. Preferred solution would be run on
beamline kubernetes cluster - in the meantime also loooking into
procserv as a possibility. (Fixing this should also allow us to stop
using the Pilatus to make directories during an Eiger collection.)
Temporary workaround in place for beamline staff, who should be
starting to run this for testing/in house beamtimes.
2. Convert detector set up to use bluesky plans and ophyd_async devices.
Investigate using the existing Pilatus in ophyd_async which writes
HDF5 instead of CBFs (may want to make a CBF-writing Pilatus).
3. Start looking into moving away from edm screens towards a web-based
GUI.
4. Improve alignment of chip: get it to work correctly for multiple
Ongoing list of TODOs:

1. Improve alignment of chip: get it to work correctly for multiple
zooms.

- Close to being completed (see issue #44)

2. Refactor and fix the logger.
3. Use callbacks for file IO, eg. to write parameter and map files, nexus writer and ispyb deposition.
4. Solution for enabling users to run mx-bluesky instead of old scripts: blocked by permission issues.

- This should also allow us to stop using the Pilatus to make directories during an Eiger collection.
- The preferred permanent solution is to run mx-bluesky on the beamline kubernetes cluster. I24 should be due to get on in shutdown 4 2024.
- Other possibility is to run the ``blueapi`` server on procServ. An example of this has now been set up on ws002 on the beamline and is being tested.
- A temporary workaround in place for beamline staff, who should be starting to run this for testing/in house beamtimes. Staff have started using this set up in September 24.

5. Convert detector set up to use bluesky plans and ophyd_async devices.

- Eiger device in dodal needs to be converted to ophyd_async and updated to work with different Eigers on several beamlines. This work is dependent on other work out of the scope of this project, see `Dodal#700 <https://github.com/DiamondLightSource/dodal/issues/700>`__ and linked issues.
- Investigate using the existing Pilatus in ophyd_async which writes HDF5 instead of CBFs, but we may want to make a CBF-writing Pilatus. However, the Pilatus detector is due to be removed soon.

6. Start looking into moving away from edm screens towards a web-based GUI.

- Prepare generic react components to match the features in the edms.
- Components for things currently managed by general purpose PVs (eg. map).
- OAV viewer.

7. Implementation of serial tools to be used at XFELS.

- Reinstate removed code from sacla and move it to bluesky.
- Add any plans/devices that might be needed for other locations.

8. Reinstate full mapping code using bluesky.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this all assumes that we do not change how we run the SSX. Are there any plans for integrating panda and coming up with a more standard PVT way of running the scans?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integrating Panda, yes, at least for the fixed target, but I have no idea yet of a possible timeline so I was going to add it at a later time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment to that affect would be good


(TBC…)


.. list-table:: Rough Roadmap
:widths: 30 30 15
:header-rows: 1

* - Work Ongoing
- Rough Timeline
- Completed
* - Fully test extruder collections
- Nov. 24
- :material-regular:`pending;2em`
* - Fix permissions and allow for user collections
- Dec. 24 / Jan. 25
- :material-regular:`pending;2em`
* - Convert the current detector set up code to bluesky plans using the device
- Dependent on `FastCS Eiger issues <https://github.com/bluesky/ophyd-async/issues?q=is%3Aissue+is%3Aopen+eiger>`__ being completed
- :material-regular:`pending;2em`
* - Set up callback for nexus writing
- Dec. 24
- :material-regular:`pending;2em`
* - Set up callback for ispyb deposition
- Dec. 24
- :material-regular:`pending;2em`
* - Set up callback for parameter and map file I/O
- Dec. 24
- :material-regular:`pending;2em`
* - Refactor logger
- Nov. 24
- :material-regular:`pending;2em`
* - Improve current alignment (moveonclick)
- Nov. 24
- :material-regular:`pending;2em`
* - Set up `coniql <https://github.com/DiamondLightSource/coniql>`__ on the beamline
- Jan. 25
- :material-regular:`pending;2em`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe coniql is now not what we want to use, I'm discussing with people at https://diamondlightsource.slack.com/archives/C06BBH6LX6U/p1727179118445009

* - Prepare React components to switch from EDM to a web GUI
- Dec. 24 / Jan. 25
- :material-regular:`pending;2em`
* - Move the OAV viewer to a web GUI
- Jan. 25 / Feb. 25
- :material-regular:`pending;2em`


Experiment types required
=========================

- Extruder

- Standard
- Pump probe

- Fixed target (probably about 80-85% of serial on I24)

- Standard chip collection – option for multiple exposures in each
spot
- Pump probe - see for short description
https://confluence.diamond.ac.uk/display/MXTech/Dynamics+and+fixed+targets

- Short delays
- Excite and visit again
- Long delays with fast shutter opening/closing

- (Future) Fixed target with rotation at each “window” (Preliminary
work done by beamline staff on the PMAC program
https://confluence.diamond.ac.uk/display/MXTech/Grids+with+rotations)

Details of zebra settings for each type:
https://confluence.diamond.ac.uk/display/MXTech/Zebra+settings+I24

Note that most of the set up for the fixed target is actually done by
the PMAC via PMAC strings.



--------------

Old roadmap for reference


+---------------------------------------+----------------+---------------------------------+
| Work Ongoing | Rough Timeline | Completed |
+=======================================+================+=================================+
| Document how to set up the current | Ongoing | :material-regular:`pending;2em` |
| Document how to set up the current | Ongoing | :material-regular:`check;2em` |
| visit, deploy the edm screens and run | | |
| a simple collection | | |
+---------------------------------------+----------------+---------------------------------+
Expand Down Expand Up @@ -71,34 +167,3 @@ Ongoing list of things needed:
| Tidy up original code and add some | Summer 23 | :material-regular:`check;2em` |
| tests | | |
+---------------------------------------+----------------+---------------------------------+

--------------

Experiment types required
=========================

- Extruder

- Standard
- Pump probe

- Fixed target (probably about 80-85% of serial on I24)

- Standard chip collection – option for multiple exposures in each
spot
- Pump probe - see for short description
https://confluence.diamond.ac.uk/display/MXTech/Dynamics+and+fixed+targets

- Short delays
- Excite and visit again
- Long delays with fs opening/closing

- (Future) Fixed target with rotation at each “window” (Preliminary
work done by beamline staff on the PMAC program
https://confluence.diamond.ac.uk/display/MXTech/Grids+with+rotations)

Details of zebra settings for each type:
https://confluence.diamond.ac.uk/display/MXTech/Zebra+settings+I24

Note that most of the set up for the fixed target is actually done by
the PMAC via PMAC strings.
Loading