Computing for Science

The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

Back to ILL Homepage

All Software

7. Other Display interfaces and "TOF legacies

Filling reciprocal space

Represention of a serie of scans during acquisition to survey different regions of the reciprocal space and identify complex features due to incommensurability or diffuse.

To top

Using the function MAKE_VOLUME we obtain a real 3D object which may assist during the mesurement to identify the observed intensities appearing outside Bragg positions. Syntax is: <code>w2=make_volume(w1,/hkl)</code>
Now the figure below shows nuclear and diffuse, magnetic scattering from many data sets taken on D9 on TbMnO3. By interactively rotating and zooming the data in (hkl) space, the data can be inspected in detail and indexing the reflections becomes easier. The 2D projections can be moved dynamicaly through the volume to help locate more precisely diffracted intensity of interest.

To top

Magnetic scattering cross-section example

Using the program suite described in the TOF-Manual (linked in the FRONT page) here is an example of diffuse scattering in manganese oxide (MnO) from D7.
Magnetting scattering cross-section of a 5g MnO single cristal at -122�C, 30�C above the temperature at which the sample orders magnetically. The nuclear contribution to the scattering has been removed using neutron polarisation analysis. Magnetic manganese atoms tend to align themselves at temp greater that the Néel temperature.

To top

George Layout

GEORGE (General Experiment Organisation, Response and Guidance Executive) allows on-line data analysis to be combined with any instrument control and data acquisition sequences. The macros written by the instrument scientist has a frequency property which determines how often information is sent to, or received from the instrument control system. Other properties when updated in the macro, allow George to display "live" texts, images, fit results etc...
The Control Pad with there pull-down buttons is dynamicaly constructed at launch from a text file edited by the scientist!!!

To top

Mask & Group

This interface allows the noisy or unwanted spectra in a workspace to be masked and the remaining spectra to be regrouped into a new workspace. At start-up a colour chart is displayed until a workspace is loaded using the Load W# button.

Masking

By default a log image of the data is shown. Normally this reveals the bad spectra as horizontal lines (shown above). Spectra are selected for masking by clicking on the image with the left mouse-button, and deselected by clicking on a previously selected spectrum. A range of spectra can be selected by clicking on the first with the left mouse-button, and on the last with the right mouse-button. To save a mask so that you can apply it to other runs click on one of the M1..M3 buttons. You can write the cleaned data to a new workspace by selecting a workspace and pressing Write to W#. N.B. Be sure that the Group spectra button is not selected if you do not want to group the output workspace. If you want to re-use a saved mask for another run use the Load mask buttons, otherwise you can define a new mask

To top

Grouping Spectra

Normally it is best to filter out the unwanted spectra (masking) before grouping. Move the slider at the bottom of the window to select the number of groups to be generated. The marks on the right of the image will show which spectra will be grouped together. Remember to select the Group spectra button before writing to the new workspace.

Tips

This is one interface that it is worth keeping as an icon, otherwise you never know what the mask is. It is also best to treat as many runs as possible in one session with this interface.
You can use Export to 'Scroll Spectra' to view the current workspace in Scroll Spectra without having to reload it.

To top

The TOF Manual which will help you to reduce Time-of-Flight data is linked to the FRONT page

DidLine

A friendly way to inspect rapidly the Tof raw data.
The call is :Wi = didline(Wj) Where Wj = Workspace containing the raw sample.

This command invokes an intermediate interface to specify essentials inputs.
Before calling didline check the following parameters:
Pj( 2)= Doppler frequency (Hz)
Pj(11)= Temperature (K)
Pj(18)= Channel width (microsec.)
Pj(21)= Wavelength (angstroms)
Pj(27)= Distance Det - Sample (meter)

To top

Convert to Energy (t2e)

LAMP uses the function t2e (tee) to convert the x axis from time-of-flight (channels) to energy. Usually it is best to normalise, remove noisy spectra, subtract background etc. before using this transformation.
The function is written in IDL and can be examined by pressing the User Macros? button and selecting t2e.pro from the list which appears.

LAMP makes two simple checks on the input workspace before converting to energy.

  1. Does the workspace contain more than 1 point?
  2. Does the text t2e exist in the history of the workspace?

If the input workspace is suitable, t2e will convert the energy scale and make the appropriate corrections to the intensity for changing from time-bins to energy-bins. The title of the x-axis is changed. A "shot" sound indicates success and a "crunch" sound signifies an error. Please report unexplained errors.

 

  • Tips: If the resulting spectrum does not have the elastic peak centred at zero energy there is probably an error in the elastic-peak position. Either use lineup to align all positions, or sum all spectra of interest,
    e.g.:w2=total(w1(*,20:80),2)
    then plot w2 and find the elastic peak position with the cursor (click left mouse-button on peak). Press the Data Params button and edit the elastic peak position to the correct value. Repeat t2e.

    The sample energy-loss side of the energy spectrum may go to very high values. If the energy spectrum looks odd, with the elastic-peak at one end, select a more realistic plot-range.
    If you have been using plot limits in channels remember to change these values before plotting in energy.

To top

Rebinning Irregular Data (rbin)

Data on an irregular energy-scale can be rebinned to a regular grid by typing rbin in the formula-entry window. A window opens in which the energy range and energy increment can be chosen for a given input and output workspace.
The rbin window makes and executes the command: w_out=ebin(w_in, E min, E max, increment)

If required this command can be entered directly in the formula-entry window as, eg.

w2=ebin(w1,-0.7,7.0,0.05)

To top

Convert to s(Q,w)

When time-of-flight versus angle data are transformed to energy versus momentum transfer (Q,w), the data points fall on a rather irregular grid. A Delaunay triangulation of the planar set of Q, w points is constructed and used to interpolate the data onto a regular grid which can simplify preliminary analysis.
The function sqw performs this task but the syntax is complicated so you are strongly recommended to use the sqwwin command, but if you wish to make conversion within a macro or command file you need to use the sqw function.

To top

Function sqw

example syntax: w2=sqw(w1,0.02,0.1,-1.0,1.0,0.1,2.0)
Order of arguments: (input workspace, energy increment, Q increment, energy min, energy max, Q min,Q max)
You should use a course grid whenever possible otherwise the processing time will be very long. Choose Q max, Q min within the limits of the data.
An aditional argument ,/fast can be added if the Q, w grid of the input workspace is the same as that used for a previous call of sqw, the same triangles will then be used, making the calculation faster.

To top

Command sqwwin

Typing sqwwin in the formula-entry area will bring up a special interface to set the arguments for the sqw function and then perform the calculation.

Adjust the sliders to select the workspaces (in and out), the energy (E) and Q ranges of interest. The default maximum Q corresponds to the maximum energy transfer in the highest-angle spectrum - that is 1 point! Usually you should reduce the maximum Q value. You should avoid generating more than about 30 points in energy and 50 values in Q.

Press the Do Interpolation button to start the calculation. If sqwwin has been used previously you will get extra options related to the triangles calculated before. If in doubt, select the Delete Triangles option. The interface closes when the calculation is complete.

To top

Normalise to Vanadium (vnorm)

The function vnorm will take the integral of a given spectral region in one workspace and then divide the corresponding spectra in a second workspace by this integral.

  • Example Syntax: w3=vnorm(w1,w2,230,250)
    Order of arguments: (input workspace, vanadium workspace, lower limit for integral, upper limit for integral)

The limits are those of the elastic peak in the vanadium spectra and must be given in channels not energy.
You can use this to get s(Q) for either an elastic or inelastic peak by extracting the spectra of interest eg.:
w2=w1(150:200,*) and then normalising: w4=vnorm(w2,w3,230,250)

Normalise Backscattering Spectra (bsnorm)

The function bsnorm is used to normalise backscattering spectra to the monitor spectrum eg. to normalise workspace,w1, and put the normalised workspace into w2, type

w2=bsnorm(w1)

To top

Line-up Elastic Peaks (lineup)

Because there are frequently small differences between the distance from the sample to individual detector-groups there can be slight differences in the time-of-flight channel in which the elastic peak arises. When keyword NOFIT is set, the function lineup first smoothes each spectrum and then estimates the position of the maximum. if NOFIT is not present then a gaussian fit is made for all spectra. An average of these positions is taken and then all spectra are shifted so that their elastic peaks are at the average position. Any peak which is more than 10 channels away from the elastic-peak channel given in the parameters is not shifted. The new average peak position is returned in elas but not entered in the parameters automatically.

  • Example Syntax: w2=lineup(w1, elas [,/nofit])

The counting statistics in an individual spectrum need to be adequate to enable the elastic-peak to be found. Otherwise the routine does nothing.

  • Tips
    You can get a quick estimate of the elastic peak position by summing all spectra (do not include the multidetector on IN5) by entering, for example:
    w2=total(w1(*,30:90),2)
    The function shift can then be used to move channels by a given integer, for example:
    w2(*,50)=shift(w1(*,50),3) will shift spectrum 50 in w1 by 3 channels. Channels shifted off one-end wrap around to the other. (See IDL help for more info.)

To top

Previous - 7. Other Display interf. & "TOF legacies" - Next