SAXSWAXS Automation

Setting up SAXS-WAXS automation

  1. After obtaining raw detector images from calibrants, follow the steps outlined in pyFAI calibration gui operations for InstantPlot to generate detector mask files (saved in .tif) and geomery files (saved in .poni).
  2. Using the templates below, save your own .yaml files. The recommended location to save the yaml files is /nfs/chess/aux/reduced_data/cycles/[YYYY-X]/id3b/[BTR-ID]/analysis/auto_yaml.
    • YYYY-X is the year and cycle number, e.g. 2025-1.
    • BTR-ID is PI name and project number, e.g. smieska-3222-A.
    • TIP: For the ease of making entries for file location, go to the directory where the file is located on a terminal window. Then run realpath filename . The filename with the full path will be printed. You can then copy this to your yaml file.
  3. Verify that all entries are free of errors.
  4. On SPEC, run setup_saxswaxs_automation "/path/to/tool_config_file_1.yaml [...]" dashboard_tool_title dwell_time_actual_counter_name presample_intensity_counter_name [postsample_intensity_counter_name].
    • Note: Instead of listing out all tool config yaml files individually, one can use * wildcards to pick up all tool config files whose name matches a pattern. For example: setup_saxswaxs_automation "/path/to/tool_config_files/*.yaml" tool_0 mcs0 ic1 diode.
  5. When yaml files are modified, the SPEC routine for setting up SAXS-WAXS automation will need to be run agian. For the ease of this step, we recommend that you define a SPEC function containing the setup routine (recommended name of the function: setup_auto) in a user custom macro file (saved as .mac), and save it in /mnt/home/chess_id3b/Macros/User_Macros.
  6. Once .mac file from the previous step is saved, run udo User_Macros/user-YYYY-X.mac on SPEC to have SPEC read in the definitions in the file.
  7. Run prdef setup_auto on SPEC to verify that the definition had been read in correctly.
When SAXS-WAXS automation is running successfully, you should see the following:
  • In /nfs/chess/aux/reduced_data/cycles/[YYYY-X]/id3b/[BTR-ID]/analysis/auto/[SAMPLEDIR], there should be:
    • a "map" yaml file per scan (map_DATAFILENAME_SCAN#.yaml).
    • a NeXus file per scan (DATAFILENAME_SCAN#.nxs).
If there are missing files, check log files located in the /nfs/chess/aux/reduced_data/cycles/[YYYY-X]/id3b/[BTR-ID]/analysis/auto/[SAMPLEDIR]/log. The most common cause of errors is typos in the input config yaml files. Errors could also arise if the computing resources running the automation routines are down.

Tool yaml file examples

Tool type Examples
Correction SAXS cake flux corrected

SAXS radial flux corrected

SAXS azimuthal flux corrected

SAXS azimuthal flux absorption corrected

WAXS cake flux corrected

WAXS radial flux corrected

WAXS radial flux absorption corrected

Integration SAXS cake integration

SAXS radial integration

SAXS azimuthal integration

WAXS cake integration

WAXS radial integration

Viewing NeXus files with NeXpy

  1. If you are at the beamline, you may use the analysis station (not the station computer) and open a terminal window. If on lnx201, connect to a higher powered computing node (32 cores) by opening a terminal window and running qrsh -q interactive.q -pe sge_pe 32.
  2. Activate the saxswaxsworkflow environment by running source /nfs/chess/sw/miniforge3_chap/bin/activate; conda activate saxswaxsworkflow.
  3. Run nexpy.
  4. Open the desired NeXus file by navigating to File > Open on the toolbar.
    • Plottable data can be plotted on the plot viewing panel by double-clicking on an entry on the data tree panel.
    • Details of all data (plottable and non-plottable) can be viewed by right-clicking on an entry > View Data.

Additional resources

-- PeterKo - 01 Oct 2024

This topic: CHESS/FMB > WebHome > SAXSWAXSAutomation
Topic revision: 05 Mar 2025, PeterKo
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback