Guide on creating a yaml file for Islatu

The yaml file provide details about the expeirmental setup, and the options desired for data analysis. It is made up from multiple sections, which are either a single item and so laid out on one line e.g.

section_name: section_value

or have multiple subheadings for various related options e.g.

section_name:
  subheading1_name: subheading1 value
  subheading2_name: subheading2 value

Important

make sure to use a double space indent for the subheadings

Below is a list of sections that can be included in your islatu yaml file, and subheadings which are the available options within each section.

instrument

This section provides details on the instrument used to record the experimental data.

instrument

which instrument was used to collect your data. Currently the only option is ‘i07’

example instrument section
instrument: 'i07'

visit

This section provides information on the experiment visit at Diamond

visit id

id for the diamond experiment, usually in the form of si#####-# e.g. si28707-1

local contact (Optional)

provide the name of the local contact during the experiment

user (Optional)

name of user analysing the data

user affiliation (Optional)

institution which the user has an affiliation with

date (Optional)

date for when the experiment took place

example visit section
visit:
  local contact: "Firstname Lastname"
  user: 'Firstname Lastname'
  user affiliation: 'InstitutionName'
  visit id: 'experimentID'
  date: 2021-08-06

setup

This section provides details on the setup of the beamline and sample

sample size

set the size of the sample in the format (sample_length, sample_width) in m, where the “length” direction is parallel to the wavevector of the incident light for q=0 e.g. (200e-3, 10e-3)

beam width

The full-width half maximum of the x-ray beam in m e.g. 100e-6

dcd_normalisation  (Optional)

The full filepath to the normalisation file

example setup section
setup:
  sample size: (200e-3, 10e-3)
  beam width: 100e-6
  dcd normalisation: /dls/i07/data/2021/si28707-1/404863.dat

crop

This section provides details on selecting a signal region of interest (ROI)

method

defines the method to use when creating the ROI, currently only available method is crop

kwargs (Optional)

define the region to be used for the signal ROI in the format {‘x_start’: X_START_PIXEL , ‘x_end’: X_END_PIXEL, ‘y_start’: Y_START_PIXEL, ‘y_end’: Y_END_PIXEL} e.g.

{'x_start': 1050, 'x_end': 1150, 'y_start': 190, 'y_end': 211}

If region is not specified the processing will default to using ROI 1 as set during the expeirent.

example crop section
crop:
  method: crop
  kwargs: {'x_start': 1050, 'x_end': 1150, 'y_start': 190, 'y_end': 211}

background

This section provides details on how to perform the background subtraction.

method

defines the method used for the background subtraction, currently only reliable method is roi_subtraction. If the roi_subtraction option for background subtraction method is not suitable, more information on the alternative options can be found in the API documentation.

kwargs (Optional)

define the region to be used for the background ROI in the format {‘x_start’: X_START_PIXEL , ‘x_end’: X_END_PIXEL, ‘y_start’: Y_START_PIXEL, ‘y_end’: Y_END_PIXEL} e.g.

{'x_start': 1450, 'x_end': 1550, 'y_start': 190, 'y_end': 211}

If region is not specified the processing will default to using ROI 2 as set during the expeirent.

example background section with roi_subtraction
background:
  method: roi_subtraction
  kwargs: {'x_start': 1050, 'x_end': 1150, 'y_start': 190, 'y_end': 211}

To skip the background subtraction step you can set the method to None or none, and or simply comment out the background section of the yaml file

example background sections for skipping background removal
background:
  method: None
  kwargs: {'x_start': 1050, 'x_end': 1150, 'y_start': 190, 'y_end': 211}

background:
  method: none
  kwargs: {'x_start': 1050, 'x_end': 1150, 'y_start': 190, 'y_end': 211}

#background:
#  method: None
#  kwargs: {'x_start': 1050, 'x_end': 1150, 'y_start': 190, 'y_end': 211}

adjustments (Optional)

This section provides details on variables which you want to overwrite or change the value of.

new_axis_name

redefine which axis is used when calculating the exit angles or q. The value specified here replaces the default axis saved in the nexus file

new_axis_type

define what type of axis the new_axis is using one of the following options:

  • tth: the new axis is two theta

  • th: the new axis is theta

  • q: the new axis is Q

theta_offset

set value to offset all calculated values of theta

OR

q_offset

set value to offset all calculated values of q

example adjustments section
adjustments:
  new_axis_name: 'diff1delta'
  new_axis_type: 'tth'
  theta_offset: 0.3
  q_offset: 0.1

rebin (Optional)

n qvectors

Integer number of bins to place q-vectors into. These bins are linearly spaced in q by default.

example rebin section
rebin:
  n qvectors: 5000

normalisation (Optional)

maxnorm

set to True or False depending on whether you want to processed Intensity to be normalised to its maximum value

example normalisation section
normalisation:
  maxnorm: True

transmission (Optional)

values

overwrite transmission values which are contained in the nexus file.

example transmission section
transmission:
  values: [1,1,1.3,1]