|
|
|
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.

SANS Data TreatmentVersion 1.95 R. Ghosh, December 2008 NEWS - recent update July 2011 ftp://ftp.ill.fr/pub/cs/sansTo account for new systems (Windows-7, Mac-OSX updates) a number of changes have been incorporated in the distributions available on the ILL ftp-server ftp://ftp.ill.fr/pub/cs/sans Here will be found distribitions for PC and Mac-OSX. The PC version includes Prop to aid running programs in the PC-Windows environment. For Mac-OSX a startup file sassetup is included as is found on the linux distribution and also described in the manual.
In parallel to the standard regrouped data output, XML formatted files are now also produced. These conform to the schema definitions of the canSAS working party. A style sheet xg.xsl is also copied to the working directory. This allows the xml files to be "dropped" onto browsers such as IE6, or firefox where the tabulated data can be viewed. Dropping the data onto Excel and invoking this style sheet when asked brings the data into a worksheet for treatment.
An updated set of programs for treating ILL SANS data has been prepared for PCs. A program launcher PROP for WindowsNT, 2000PRO, and XP greatly simplifies program use, and the X-window program versions can now also function in Windows. The current SANS Computing Guide can by obtained from the ILL ftp server ftp://ftp.ill.fr/pub/cs/sans/sans_manual.pdf SummaryIntroductionAt ILL there is both an advantage and a disadvantage in the rate at which SANS measurements can be made. Full surveys over a range of controlled parameters can be made, but the number of runs for subsequent treatment can be large. Often only a sub-set are analysed during the experiment. To simplify full analysis the following programs are available not only at ILL, but are on the ILL anonymous ftp-server to run on PCs. Part treated or raw data can be exported on diskette or CDroms. The present page is intended to survey the programs available at ILL for treating SANS data. Much of the success of experiments depends on minimising background effects, and achieving high reproducibility in performing measurements. The simple procedures for treating data still require carefully measured transmissions to enable the various component spectra to be combined to a valid result. During various stages of treatment the components are in files with compatible formats, and it is hence possible to use the standard tools shown below to identify problems arising from an occasional mis-measurement of a single component. Each data file contains information on its source and it is hence easy to trace errors arising from incorrectly measured or analysed constituents. On all SANS instuments the data follow the ILL standard specification The raw data from D11, D17, and D22 are similarly formatted, but D16 retains the standard diffractometer format. When looking at images of the detector the standard view for D11, D17 and D22 is in cartesian coordinates looking from the sample. For D16 the view is towards the sample. All raw data are accessed by routines which attempt to cope with the different raw data formats. Most programs can be used to treat data from D11, D16, D17 or D22. The LAMP package based on IDL can be used to examine raw data from the multi-detectors, and perform some regrouping tasks. Treated data are written as ASCII (plain text) files. Radially regrouped data are stored in files with names: gnnnnnn.mmm, e.g. g006123.001 with an identifying run number nnnnnn, and an extension number 1. Two dimensional data are stored in files with names: tnnnnnn.mmm e.g. t011021.001 Most programs which treat two dimensional data are capable of reading either raw or treated data. Instrument identification and location of raw data Unix environment variables are used to define the location of the data, and the name of the current instrument. These are normally predefined for the visitor file-systems. e.g. % setenv SAS_DATA_PATH /usr/illdata/data/d11/ Other environment variables which are used by the plotting programs include: PGPLOT_DIR=/usr/ill/lib All plotting expects the individual pictures to have a width/height aspect ratio of about 4:3. With settings as above the resulting x-y graphs are drawn two per A4 page in portrait format. If only one picture per page is required then plots must be made in landscape mode with: PGPLOT_ILL_DEV_2=/cps Using the Unix systemThe environment on the instrument visitor zones has been setup to offer each user their own file-space. Users arriving fresh to the instrument might find it convenient to log-off and relog-on with their own names to localise their result files. Users of other login names and those working on other workstations should note that they can set up their environment with the following commands (which might eventually be added to their .cshrc files)
% setenv SAS_DIR /home/cs/sans If the workstation is not setup with a standard configuration this might fail and the following alternative might work: % setenv SAS_DIR /hosts/serhom/home/cs/sans Programs are launched by typing their names after the shell (system) prompt.
Some useful commands when typing into a terminal window are % ls directory command Printing The default printer is set at each login session so that the nearest or most convenient printer can be selected. The first pri command starts a procedure to allow this default to be redefined. If at a later stage the printer is to be changed then the command myprinter must be given, which will offer a choice of available printers (colour/laser etc), and their locations. The choice of printer is usually based on the most convenient and fastest black-white printer. Plotting PostScript output (*.ps files) A similar procedure has been adopted to designate a printer for graphical output. The first plo command starts a procedure which will allow the default printer to be changed. At a later stage the command myplotter allows an alternative to be selected. Usually a colour printer would be chosen. Raw data programs
dirrunThis program gives a summary of the raw data files for a particular instrument. e.g. If a full directory pathname is given then this is used instead of the instrument's current default directory /usr/illdata/data/instrument/
rundexThis program gives a summary extracted from either raw, 1D or 2D treated data showing monitors, wavelength etc associated with each data file. For the raw data there are additional options to select and print parameters from these files in tabular form.
detec, detd16This produces a listing of the data; the user can select various parts of the multi-detector matrix. The smaller detector of D16 can be examined more simply using detd16.
windetThis produces a screen listing of a selected range of the datector data, with options to produce a listing file. If a reference transmssion run has been defined then ratio of the sum of the windows is printed. This is intended to aid assessment of transmission meaurements. To help assess the beam centre the cofg and the midpoint at half-height of the displayed region is calculated.
splots and xplotsThese programs show coloured pixel maps of the raw data, with the possibility of creating PostScript plots with one, or, allowing comparisons, up to 6 pictures per page. The xplots version only runs on colour-graphics X-terminals, but incorporates a button- pushing interface. xplotc includes a cursor function on the pixel map.
anspecThis draws isometric projections of the multi-detector data on screen and for PostScript hardcopy.
grundThis program is used to examine a nominally flat spectrum, and, interactively, allows cell contents outside fixed limits to be identified, and a mask created to act as a filter in subsequent analysis.
contContour plots of raw or treated data are produced interactively.
colrowThis program sums, plots and lists multidetector data, locating the maximum, and estimating peak widths. Data can be normalised with a nominally flat spectrum for removing efficiency and solid angle effects.
rmaskThis can generate mask patterns with different geometries which then can be applied to eliminate bad data before treatment. Regrouping ProgramsThese programs, and the programs which display and analyse these regrouped data are Fortran programs which have been compiled with a limit of 180 Q,I,errI values per spectrum. The limit is a consequence of fixed storage imposed by the language, and the general access routine RGIO has the limit set in a block data statement, which can thus be overridden without modifying the rlib library.
rnilsPerforms basic regrouping, presenting the results of sequences of experiments side by side, simplifying comparisons.
snilsPerforms regrouping, but iterates to eliminate cells which are intermittently noisy, which cannot easily be masked out using grund or rmask.
aregRegroups data with the possibility of defining multiple segments.
iqpsiRegroups data radially in large numbers of sectors, plotting results. Results can be saved in a text file.
ananasRegroups data as a ribbon of boxes at an angle which may be set to match a 1D ordered sample axis.
rnd16 and rnd16sA version of rnils for D16, the latter incoporating detector efficiency corrections. red16Treats one or a set of two-theta scans on D16, and regroups data with efficiency and solid angle corrections if required. Results may be stored in a format compatible with other SANS programs. To obtain a summary and index of data files use rundex Data Corrections
spolly, xpolly, mpolly, anpoly, mill, xmillThese programs combine regrouped and unregrouped data respectively, and create resultant files where the extension number is uniquely incremented. xpolly is a version of spolly with a button- pushing interface, and extra features. mpolly can be used for sequences of sample measurements when other correction factors remain constant. Simple corrections dealing with a sequence of samples can be performed with mill and xmill. These treat either 1D or 2D data in the same manner. The second provides push-button controls. Data PresentationIn general, sets of similar samples are compared, hence comparative display plays an important part in analysis of results.
xplots, colrow, and anspec will all display treated 2D data
rplotThis plots a number of functions of intensity and scattering vector for up to two sets of regrouped data.
mplot, xmplotPlots up to 10 regrouped spectra. A number of functional forms may be selected. The second has pushbutton controls, and allows printing without leaving the program.
rlistLists regrouped data in a similar fashion to SPOLLY, thus the table includes "radius", theta, Q, Q**2, Q**-4, I, dI, IQ**2 etc.
smorgerA utility program which merges regrouped data, either by concatenation or sorting into increasing magnitude of Q. The program will also trim points off the ends of data to be incorporated. To obtain a summary and index of files use rundex Anisotropic Treatments
ansmooPerforms local smoothing of data
ancos2Analyses data as elliptical distortions typically due to external constraints. To obtain a summary and index of files use rundex Interactive Analysis
rguimThis fits straight lines to selected regions of data points, deriving a "radius of gyration" for a number of simple structural models.
sasgau, saspksUses the FITFUN library to fit gaussian and other peaks in regrouped data
sasfit4Use the FITFUN library to fit gaussian and other peaks in regrouped data for sequences of data. The starting parameters are refined within a FITFUN environment. Then sequences of data may be fitted with parameters being systematically updated, or the original starting vaulues being re-used for each set. This allows overlapping peaks which change intensity and/or position to be analysed quite sensitively. Output is given suitable for spreadsheet use.
ssqfunUses the FITFUN library to fit concentric shell models to regrouped data. Uses the FITFUN library to fit selected polymer models to regrouped data (A R Rennie, Uppsala University).
sqconUses the FITFUN library and routines by Hayter/Penfold to fit SANS patterns from concentrated macroions in solution (A R Rennie, Uppsala University). A number of other programs use the FITFUN library to treat SANS data. Other commonly used SANS analysis programsSANS analysis programs from other centres are also installed at the ILL, and are described here. Reading Data from other facilitiesA number of programs have been written to transform data from other centres to enable further treatment by ILL programs. These include: ralread reads data from LOQ at ISIS, Rutherford Lab. Self-Service ToolsThis library contains routines to access raw and treated data in a systematic fashion, with reasonable error reporting, and some debugging facilities built-in. This has been used extensively in the above programs. Plotting routines are also included. This contains the PGPLOT plotting package written and maintained by Dr. T.J. Pearson of the California Institute of Technology, with some extensions developed at ILL including multiple open devices. |