|
|
|
Pour utiliser sur le web | Pour imprimer en haute résolution |
|---|---|
Télécharger PNG | Télécharger TIF |
Télécharger JPG | Télécharger EPS |
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.

Installing the TAS software package on UNIX or OpenVMSContents1. Installing PkFit and Filing on an OpenVMS workstation1.1. Download the PGPLOT libraryIf the PGPLOT library is not yet installed on your computer, download it from the PGPLOT ftp server www.astro.caltech.edu/~tjp/pgplot/ (131.215.240.1). Install it as explained in the file "install.txt" which comes together with the PGPLOT files. Check that you have at least the files:
1.2. Download the archive-fileDownload one of the two gzipped tar archive-files:
E.g. use the sample FTP command lines:
cd pub/tas/pkfit/appl 1.3. Expand and decode the archive-file.This requires the GUNZIP and VMSTAR utilities which are not part of the VMS system but can be easily found on the internet (e.g. "http://www.digital.com/info/vms-freeware.html" for executable files). Run those of the following lines appropriate to your computer. Note that the strings "disk" and [dir]" must be replaced by the correct ones. ! for Dec-alpha computer This will create a subdirectory [.TAS-prog] or [.TAS-src] <code></code>into the current directory. Thus, make sure that the current directory is the appropriate one. 1.4. Define and set the following logical variables PGPLOT_DIR full pathname of the directory of the PGPLOT library files If you downloaded the application archive-file you are now able to run them. If not, just follow the instructions of the point 5 to compile and link the FORTRAN code. 1.5. Creating the executable filesFirst define the following temporary logical variables: PKFIT_DIR full pathname of the directory of the source files Note that this command will delete all the object files at the end of the installation process. 2. Installing PkFit and Filing on a UNIX workstation2.1. Downloading the PGPLOT libraryIf the PGPLOT library is not yet installed on your computer, download it from the PGPLOT ftp server astro.caltech.edu/pub/pgplot (131.215.240.1). Install it as explained in the file install.txt which comes together with the PGPLOT files. Check that you have at least the files: 2.2. Downloading a TAS-prog archive fileDownload one of the three gzipped tar archive-files:
E.g. use the sample FTP command lines: cd pub/tas/pkfit/appl 2.3. Decode and expand the archiveThis requires the widely distributed gunzip and tar utilities. Decode and expand the archive to a new subdirectory TAS-prog or TAS-src, using the following lines. Note that the archive-file name must be replaced by the correct one. 2.4. Define and set the following environment variables: PGPLOT_DIR full pathname of the directory of the PGPLOT library files If you downloaded one of the archive-file which contains the executable file, you are now able to run them. If not just follow the instructions of the points 5 and 6 to compile and link the FORTRAN code. 2.5. Configuring the command file "createtasprog"Before this file can be used, its contents must be adapted to your specific context. In fact, while the current operating-system (OS) is automatically recognized at run time, several environment variables must nevertheless be set by hand. Thus use a text editor to set the compiler and linker options and the library's access-pathname as explained below. In the original file createtasprog, the six lines listed below define the computer configuration and must be adapted to your specific case. This set of lines is provided in three different versions: 2.6. Creating the executable filesExecute the command file createtasprog (i.e. double click its icon) to create the executable files pkfit and filing: Note that this command will delete all the object files at the end of the installation process. 3. Main features of the Graphic User InterfaceThe graphic user interface of the VMS/UNIX version of PkFit and Filing is based on PGPLOT routines and thus cannot fully mimic the MacOS or the Motif interface. We give here a short description of its main features. 3.1. Graphic device typeWhen launched, PkFit and Filing ask for the type of the terminal you are using. We list below some typical answers:
3.2. MenusThe menu bar is shown at the bottom of the PGPLOT graphic window. To select a menu, click on it. The item "Menu1" goes back to the main menu bar and when the menu bar is wider than the graphic window, the item "Next" displays the hidden items. 3.3. DialoguesThey can exhibit five kinds of items, the use of which is described below:
Note: The delete key must be assigned to a given key stroke (usually the backspace key). The item "General" of the menu "Preferences" makes it possible to perform a permanent assignment. The item "General" of the menu "Options" makes it possible to temporarily override the current assignment. This new assignment ends with the current session.
4. Basic use of FilingA printed manual for the UNIX/VMS versions of Filing is not yet available. Please refer to the tutorial for a description of a standard use and to the manual of PkFit for a description of the supported file formats. The following is a list of basic actions to handle TAS data files.
Note that Filing accepts data files with 1 to 500 points. 5. Basic use of PkFitPkFit may be used in many distinct ways that will become apparent when reading the tutorial and, when using the program. A specific manual of PkFit for UNIX/VMS is not yet available. However, we encourage users to read the MacOS manual since the UNIX/VMS versions and the MacOS version are similar, except for the human interface. As a quick start, we list here a set of basic actions which allows TAS data to be fitted.
Note that PkFit accepts data files with 1 to 500 points. 6. Using resolution calculationIn PkFit, the resolution function can be calculated by means of two methods:
The Cooper-Nathans method, used in the old version of RESCAL for VAX computer, is a classical method based on rather simplifying assumptions, i.e. gaussian beams, angular collimations. The input parameters are taken either from the data files (TAS formats) or from a resolution parameter file. These parameters can be changed, listed, saved and printed via the appropriate menu items. The Popovici method, used also in the program RESTRAX for UNIX and VMS workstations, is a more efficient method which permits to take into account focusing monochromators and analyzers as well as spatial beam collimations. The input parameters are taken from three sources:
Please refer to the tutorial for a description of a standard use of the resolution function and to the manuals of PkFit and RESTRAX for a detailed description. As a quick start, we list here a set of basic actions:
7. Adding user functionsIn PkFit, you can add your own peak-shape to the built-in list in a very easy way. You have to modify only one file. However you will have to compile and link whole PkFit. 7.1. SyntaxA user-defined peak function for PkFit is decared as a subroutine and must take exactly the argument list as shown below. USERFUNC1(YUser,Height,NUse,IN,XIN,A_BoseCorr,CENT,WID, Character MyUserFuncName*12
and the following are output parameters:
Height Peak height YUser A vector of N_Max_Data values of the user function at the abscissa XIN. PkFit uses the MyUserFuncName in two distinct ways:
Height must be a constant multiplyed by the ratio Area/Width. If not, PkFit will compute wrong peak heights. 7.2. Building again the PkFit executable fileWith the TAS-src package an example of the code of a user function is given in the file pkfituserfunc.f. We assume here that you have already installed PkFit from the TAS-src package (either on OpenVMS or UNIX) as explained above, but without deleting all the object files. Therefore what you have to do is to modify the FORTRAN code of two subroutines and to add the subroutine of your function in the file pkfituserfunc.f:
To build again the PkFit executable file, use the command file createpkfit, which is part of the TAS-src package. 8. New or undocumented features8.1. Reading files in free format (PkFit and Filing)
8.2. Q scan and four-dimensional convolution (PkFit)In the case of a Q scan, the four-dimensional convolution by means of the Monte-Carlo integration technique has been improved. A local dispersion-curve can be applied to a general Q scan [e.g. along (QH,QK)]. For a sinusoidal dispersion-curve, Q scans are not allowed since the dispersion-curve equation cannot be solved with respect to the energy. 8.3. Linear constraint (PkFit)Linear constraints can now be applied to fit parameters. In the fit-parameter field, simply replace the parameter value by a formula of the type p*Xn+q where p and q are real numbers, X is the fit-parameter name (e.g. H,W,C,A, or S) and n is the peak number. The fit will be performed with the constraint Xm=p*Xn+q, e.g. C1=-C2, A1=0.629*A2-10. 8.4. Monochromator and analyzer curvatures (PkFit)An option helps you to find optimum curvature values of both the monochromator and the analyzer. The monochromator is supposed to focus a parallel beam on the sample, while the analyzer curvatures are set to focus a point at the sample to a point at the detector. Usually these values are not far from the optimum values giving maximum intensities. This option is similar to the command "RO" in Restrax4.1 for Open-VMS/UNIX workstations (current Restrax version). Simply click the corresponding button in the dialogue "Set focusing parameters" (menu "ResCal", item "Set resol. param."). 8.5. Instrument-configuration parameters (PkFit)The calculation of the resolution function by means of the Popovici method requires extra parameters describing the instrument not available in the data files. A built-in table of the parameters of the ILL three-axis spectrometers has been implemented. A TAS configuration file is no longer necessary, but it can still be used to define either a non-standard configuration of ILL spectrometers or the configuration of a non-ILL spectrometer. Select the item "Activate resol. calc." from the menu "ResCal". A dialogue is shown which allows you to choose the method to calculate the resolution function, either Cooper-Nathans or Popovici. In the latter case, choose the built-in configuration parameters (check box) and the ILL instrument (item list) or click the button "Read" to read the configuration parameters from a file. |