Skip to content

APS 1ID: Multigeometry Hydra Detector

ZhangxiJesseFeng edited this page Jun 5, 2023 · 13 revisions

Setup the folder

After you have completed the setup of the rietveld environment, setup the files used for this example using:

milk-examples -e 5

This will copy the files for the APS Multi-geometry Hydra detector example in the current folder. Note that due to the way MILK is installed, scripts inside the MILK/bin folder does not need ".py" in the call to be recognized. But in instances where a local python script is needed, we will see the use of the full command python script.py.

Rotation of points

This example is very similar to the previous one, but instead of one detector image, we have 4 detectors:

Combined image

Notice the 4 images are all rotated. We will need to first account for this rotation during the .poni file generation. We will walkthrough the process for detector GE1 and leave the other 3 as exercise.

Open pyFAI with pyFAI-calib2 ge1.tif -w 0.13051 -m mask1.edf -n ge1_points.npt -c CeO2 --fix-rot3. This time, the rings are already selected and the points are saved. We see:

GE1 with points

If we fit the data as-is, we see the azimuthal angles are between -90 and -180, as suggested by the orientation of the ge1.tif image:

before rotation

Going back to "Geometry Fitting", since we set "Rotation 3" to be fixed, we can adjust it manually:

Adjusting rotation

We expect the azimuthal angles to be roughly between -30 and -110 degrees. Enter the value of -1.2 then press enter to obtain a new fit and observe the difference:

after rotation

Try a few rotation 3 values on your own to see the effect of the rotation. It does not change the overall fit, but simply shifts the data along the azimuthal axis.

Save the final results as ge1.poni, then repeat the process for the other 3 detectors so that GE2 is roughly between 150 to -110, GE3 is roughly between 80 to 150, and GE4 is roughly between -30 to 60. They don't have to match perfectly (and they won't match perfectly) since the refinement process will take care of the adjustments.

GE2:

after rotation ge2

GE3:

after rotation ge3

GE4:

after rotation ge4

Calibration

With the 4 detectors adjusted, we can run tutorial.sh or tutorial.bat for Windows like previously. Note the input files were modified. For example, the json files specify file names for all 4 detectors. After the process is done, we can open the .par files in Maud plot2D and visualize the results. The 2D integrated combined the 4 detectors while the detector calibration kept them separate:

APS 2D int result APS det result

Final results

With 2D integration:

APS final result 2D fit APS final result 2D map

With detector:

APS final result detector fit APS final result detector map
Clone this wiki locally