Walkthrough 2 - Optional settings applicable to all scan types

There are several optional settings that can be included for all scan types, which fall into the following categories:

  • masking

  • skipping

  • DPS settings

  • Using thv motor

  • Using slits

Masking

There are two methods available to mask unwanted pixels or areas from you image.

Option 1 (preferred)

Make a mask by using the makemask command from the terminal line after loading fast_rsm. This requires two inputs:

  • -dir =the path to where the experiment data i stored

  • -s =the number of the scan you want to make the mask for

e.g.

module load fast_rsm
makemask -dir /dls/i07/data/2025/si36456-5/sample1 -s 535612

This will open up the mask GUI. Save the created mask and note down the full file path to the .edf file.

edfmaskfile

path to the .edf mask file under this variable

Option 2

Alternatively you can directly specify pixel or regions to mask

specific_pixels

here you provide a list of pixel positions to mask in the format [(xvalues),(yvalues)] e.g. [(233, 234),(83, 83)]

to mask whole regions, specify the indivudual regions as mask_n in the format (xstart,xend,ystart,yend) and then combine them together into a list mask_regions e.g.

mask_1

(0, 75, 0, 194)

mask_2

(425, 485, 0, 194)

mask_regions

[mask_1, mask_2]

min_intensity

used to set a minimum intensity threshold below which the pixel is masked

Skipping

If something has gone wrong during the experiment and you end up with corrupted images you can still process the scan, and set the software to ignore specific images in specific scans

skipscans

this should be a list of scans which have images to skipimages e.g. [123,124]

skipimages

this is the list of images to scan for each of the scans given in skipscans e.g. [[10,16,24],[11,23]]

DPS settings

If you have used the Detector Positioning System (DPS) in your experiment you will need to include the initial positions of the DPS when aligned on the straight-through beam

using_dps

set this to True when your experiment has used the DPS The actual positions of the DPS are saved in the following four variables, saved in units of meters

  • dpsx_central_pixel

  • dpsy_central_pixel

  • dpsz_central_pixel

  • dpsz2_central_pixel

Using thv motor

use_thv

set this to True if you have used the hexapod to access higher angles and require using the thv motor

Detector slits

If you have used extra slits infront of the detector you will need to specify the ratio of the slit distance to the sample detector distance. For example if your detector distance is 0.89m and your slits are positioned 0.55m away from the detector the ratio would be 0.55/0.89

slitvertratio

if you have used vertical slits include the ratio of distances here

slithorratio

if you have used horizontal slits include the ratio of distance here

_images/i07_EH2_geometry.png

Examples of using all of these together for an extra section in your exp_setup file is as follows:

##### ^^^^ REST OF MINIMUM SETUP FILE ^^^
map_per_image = False

# ===================================================================
# =======Optional settings applicable to all scan types
# ===================================================================
#               ===========MASKING=============

edfmaskfile = '/dls/science/groups/das/ExampleData/i07/fast_rsm_example_data/masks/exc_gaps.edf'
skipscans = [123,124]
skipimages = [[10,16,24],[11,23]]

using_dps = True
dpsx_central_pixel = -0.0481825
dpsy_central_pixel = 0.0270
dpsz_central_pixel = 0.2000
dpsz2_central_pixel = 0.160

use_thv = True
slitvertratio = 0.55 / 0.89
slithorratio = 0.55 / 0.89