q-range Calculator
Download
Here are some files for a simple q-range calculator to help plan your experiments at the SAXS/WAXS beamline. The files are python scripts packaged with pyinstaller, so they are operating system specific. Please download the file appropriate for your operating system. The q-range calculator is a single EXE / APP file that can be opened by double-clicking the file. Please be patient as it may take 10-15 seconds to open up.
Instructions
Display Detector Image Tab
The main “Display Detector Image” tab is the most useful for finding the q-range possible with at a specific set of instrument parameters.
Detector selection is made from a drop-down list. Note: the input validation is linked to the detector (hence beamline) selection, so make sure this is correct or the q-range you request may not be possible on the day of your experiment.
Beam centre X and Beam centre Y are pixel coordinates for the beam centre position on the detector where the origin (X=0, Y=0) is in the lower left-hand corner of the detector image. Tip: input limits can be seen when you have no value in the input box.
Energy is the energy of the X-ray photons in keV.
Distance is an estimation of the sample to detector distance in mm. Note: the actual sample to detector distance for your experiment may vary slightly depending on the sample environment and specifics of your set-up. Secondary Note: shorter camera lengths will give you higher maximum q-values at the expense of the low q and vice-versa.
Show Detector Modules checkbox toggles the display of detector module gaps i.e. what you would see changing between “gappy” and “gapless” images at the SAXS/WAXS beamline.
Colour Map selects the colour map used to display the q-range scale on the detector simulated image.
q ROI draws a circle at a specific q-value on the detector so you can find where a specific region of interest would fall on the detector. This may be particularly important to consider if you have an aligned structure and azimuthal information is important to your experiment.
Save Parameters will bring a pop-up screen to allow you to quickly save your input parameters in CSV format. This saved file will be a great way to communicate your deepest scattering desires to your beamline scientist.
The text box at the bottom of the tab will update when you update the detector image plot. It will list last used parameters, an indicative q-range, and possibly some warnings about what sample environments may be needed to reach the q-range (especially important for high-q set-ups).
Find Instrument Parameters Tab
The “Find Instrument Parameters” tab is useful when attempting to find parameters to match a specific q-range but don’t have a good starting point to start looking.
Detector works as a drop-down selection box the same way as the main screen. Note: once again movement and energy limits and validation is linked to the detector (hence beamline) selection, so choose the correct settings so that you are not later disappointed.
Suggest two camera lengths checkbox toggles whether it is OK to suggest a long and short camera length to achieve your q-range selection.
Beam centre X and Beam centre Y are inputs the same as the main screen.
Fix Beam centre checkbox toggles whether it is OK to suggest a beam centre position different to your input values. The routine currently only checks one additional pre-defined position.
Energy works as an input the same as the main screen. Note: this must always have a valid value to run properly.
Scan Energy checkbox toggles whether or not to disregard your energy selection and check all energies in steps defined by the Energy Steps drop down box below.
Minimum q is the minimum q-value (in inverse angstoms) you are looking for. Note: it must be less than the Maximum q.
Maximum q is the maximum q-value (in inverse angstoms) you are looking for. Note: it must be greater than the Minimum q.
The textbox at the bottom of the tab will contain the output values from your search. You may need to scroll through this box to see the full output. The output (if successful) should list the Beam centre X, Beam centre Y, and Energy parameters along with a camera length range (see Distance in Display Detector Image tab) where the selected q-range is possible. Note: Black text is usually good and everything is vegan kocher, Blue text may have changed your input settings, and Red text means the search for your q-range has failed with those parameters.
Note: the warnings from the Display Detector Image tab about nosecone and vacuum chamber requirements are not displayed on this tab, so if you are worried about those check your chosen parameters using the main tab.
Unit Conversions to q Tab
The Unit Conversions to q tab is useful for basic conversions of two-theta angle or d-spacing to q-values. While these are trivial calculations, they are included in the GUI to assist use of the other more interesting tabs.
Tips
Beam centre position choice (transmission/general tip)
Using an asymmetric beam centre position (usually lower-left hand side towards the origin) is useful to extend the maximum q-value measured at any given configuration. However, this is most useful for unaligned samples. If you have an aligned/anisotropic system, consider placing the beam centre towards the centre of the detector to measure the full azimuthal range. Examples of asymmetric and centred positioning are shown below.
Typical beam centre position for GISAXS
For GISAXS experiments an asymmetric beam centre position is typically used. If you vary away the typical position, remember to keep the Y-position near the bottom of the detector since everything below the beam centre will be shadowed by the substrate and cannot be used. A typical GISAXS beam centre position is shown below.
Extras
As has been noted by some Linux enthusiasts, we don’t currently have a version of the q-range calculator to work on that operating system. We hope to one day have a version of the calculator that is compatible but for now if you need to run the program on a Linux-based machine the raw Python code is provided in the following TXT document (uploaded as a TXT in an attempt to avoid any download issues, just copy/paste the contents to wherever you are running your local version of python).