To have a nicely working spec makes beamtimes much more convenient. In this chapter it is described what is necessary to customize spec for your needs (section 3.1) and the most important configuration steps at the beginning of a beamtime (section 3.2).
Normally all major spec macros which provides you with features like opening the beamshutter with a command line or calculating the absorption of the filters should be installed on the 6ID-D Side Station and 6ID-B Main Station. Mainly on the 6ID-B Main Station not all commands described in chapter 4 are installed. This can be easily done by downloding those macro packages from this internetserver, see http://idefix.mu.aps.anl.gov/hupfeld/spec_macros/ and automatically calling them from the file ``spec.mac'', which is automatically loaded if found in the same directory spec is started in. Also in this file all definitions should be made if additional data should be saved during scans.
All necessary macros are preloaded at the side station. A spec.mac file is not required. If you want to load additional macros or change the data written to harddisk during a scan use spec.mac as an example.
Not all macros are necessarily preloaded, exspecially hp_fio.mac or hp_lakeshore340.mac might not be preloaded. Use spec.mac as an example to load those packages. In this example of spec.mac complete path names to a directory where those packages are available on the computer su1a.mu.aps.anl.gov are included or the packages can be downloaded from this webserver (http://idefix.mu.aps.anl.gov/hupfeld/spec_macros/).
To get spec running in a state where it is convenient to use for a whole beamtime roughly ten minutes of time is needed. This section will show all necessary steps in the correct order to get a running environment. This procedure has to be done only at the beginning of a new beamtime. Only in rare cases like a fatal crash of spec or the beamline computer it might be necessary to repeat this procedure. This is the recommended procedure for both the 6ID-D Side Station and the 6ID-B Main Station.
First do a fresh start with spec. To do so close spec with the command quit if it is still running. Now change the directory you have created in section 3.1 and start it again with the command spec -f. This erases any changes prior users might have made and the standart macros are reloaded in their original version as should be shown on the screen. Now exit spec again and start it the regular way with the command spec. You should avoid any fresh starts during your beamtime because you will lose all changes and configurations you made.
Now execute the command startup in spec. Here you are doing all the basic configurations. For most of the questions the default configuration is fine or the question is selfexplanatory and depends for example on your sample so just hit enter if you want the default or do not know what to do. There are only two really important questions: ``Data file (/dev/null)?'' Here you definitely should enter a data file name. It is recommended that you put the data files into a separate directory which is a subdirectory of the directory you are currently working in and giving the ening ``.spc'' to the filename. So for example you could answer: data/sample1.spc
The second important question were you should chose something else then the default is ``128) Use high resolution plotting device (NO)?'' Please answer yes if you want to see graphics during your scans, which is recommended.
The following questions are about your sample and the UB-matrix you want to work with, all those parameters can be changed easily during the experiment so if you want you can stay with the defaults and do the changes later. If you made mistakes answering the questions just start again with the command startup.
The automatic creation of fio files is not a standart spec feature. Nevertheless it is recommended to use it because it created data files for each scan which are easy to read and can copy those data files to another computer which gived additional security in case of a computer crash. If you want to know how to run a data analysis of these fio files see chapter 5. See section 4.11.1 for an explanation of the spec macros related to fio files and hp_fio.mac for the code.
First a name and a number for the fio files has to be defined. To do so execute the command fio_new_filename. First you are asked to enter a new filename: ``Data file (0)?'' In brackets the old filename is given, ``(0)'' means that this program was not in use since the last fresh start. Enter for example data/sample1_ which will store the fio files in subdirectory data and the filename will be sample1_xxx.fio where xxx is replaced by the scan number. In the next question you are asked for the last used scan number: ``Last scan number (0)?'' which is normally zero. In some cases it might be advisable to start with a different number, for example after a crash and you want to continue your measurements or to match the scan numbers used in the data files written in the spec format. It is strongly recommended to use the same scan numbers in the spec and the fio data format even though they are completely independent.
Second you can automatically copy your fio data files to another computer. This is recommended as a safety precausion because this gives you an automatic immidiate backup of all of your data. To do so execute the command fio_new_copy. You are asked for computer where the data should be copied: ``user@computer: (email@example.com:)?'', the default in brackets. If you are working at the 6ID-D Side Station it is recommended to use ``firstname.lastname@example.org:'' or ``email@example.com:'' (the colon is important, do not forget it!). If you are working at the 6ID-B Main Station it is recommended to use ``firstname.lastname@example.org:'' or ``email@example.com:''. Next you are asked for a directory where the files should be stored:''directory (trashcan/)?'' Once again, the default is in brackets. Please create you own directory at ``idefix'' or ``mar'' in one of the user accounts that your data files are not mixed up with files from other users. Warning! Data files might be removed at any time after the experiment from the beamline or data analysis computers so it is strongly recommended that you make a copy of your complete data set after the experiment on one of the computers at your home institution. Read section 6.1 for advice about how to copy your data.
It is possible to copy fio files to any other computer even in your home institution automatically. But it is necessary that a ssh daemon is running on this mashine and you have to set it up that the beamline computer can access it through the public-private key structure of ssh without having to enter a password or passphrase.
To check how the creation of the fio files is configured use the command fio_show_settings. There you also get advice how to stop the automatic creation and copying of fio files. If you do not want to use fio files any more you just have to execute the command FIO_NAME="" (please be sure to use capital letters). No deinstallation of the hp_fio.mac macros is necessary.
If for any reason the commands fio_new_filename, fio_new_copy and fio_show_settings are not available then the hp_fio.mac was not installed by default. This is very likely for the 6ID-B Main Station the case. See section 3.1.2 how to do this.
It is recommended that you check very carefully before starting with taking data if the data is written into either fio or spec data files. To do so start a quick scan and check if you can find it in the spec file, that you can find a fio file which belongs to this scan on the beamline control computer and you also find this scan on the mashine where it is supposed to be copied to.
You might encounter problems exspecially with the automatic copying if you are working at the 6ID-B Main Station. This is due to the fact, that the beamline control computer of the side station is using ssh2 which in some versions is incompatible to the most commonly used openssh or ssh1 standart. There is no solution to this problem until a compatible version has been installed. You have to copy the files manually from time to time. It looks like if the files can be accessed from outside mashines so that you can use Spectra to ask for a data file whenever you want to look at a specific file during your data analysis. See chapter 5 for explanation.