The SearchDB.cgi CGI script helps the user search through the mSR runs database for specific phrases in the run title, comments, field and temperature. It is a very basic search, which means it looks through text based database files rather than through the mSR data files themselves. The advantage of this approach is speed, with the disadvantage that it is not thorough or detailed.
Another use for this script is “of the fly” downloading and converting data files to your local disk. This utility can be very useful for users who want to use their own programs or computer to analyze the data or make a backup of the data in your home institute.
Please do not abuse this utility by trying to download a huge number of data files. Such activity will be monitored and if needed action will be taken.
Finally, this script is integrated with the musrfit.cgi which allows you to plot and fit selected runs easily and quickly online using any web browser.
Thank you for using this script. Please contact Zaher Salman <zaher.salman “at” psi.ch> if you have any problems, suggestions or comments.
The SearchDB.cgi script can be reached using any web browser, also from outside PSI, by following this link
You will then see the following html form:
In what follows we will explain the meaning and use of the different fields,
Area: a drop down menu to select the beam line or spectrometer where the experiment was performed on. These include LEM, GPS, LTF, Dolly, GPD and ALC.
Year: a drop down menu to select a year for which the search will be limited to, i.e. only experiments from this year will be searched.
The from and to fields allow the user to limit the search to a range of years. If one of these fields or both are left empty, the search will be performed taking into consideration one or no limits.
Run #: allows the user to specify the run number, so only runs with the given specific number will be searched.
The from and to fields allow the user to limit the search to a range of run numbers. If one of these fields or both are left empty, the search will be performed taking into consideration one or no limits.
Run Title: is the field where the user gives the phrases which will be looked for, these phrases can appear in the tile of the run, the comment of the run, temperature or magnetic field. The user can look for multiple phrases (that appear in the same run) using comma separated phrases. Note that care should be taken when looking for phrases that include the following special characters
| [ ] ( ) * ^ / \ . $ + ?
In this case, one has to precede these characters by a backslash “\” (see example above).
You may also reset the search limits and phrases by pressing on the “Reset” button. Once the search limits and phrases are give, press the “Search” button to run the script. The search results will be displayed in the following format:
Depending on the spectrometer, LEM or bulk, the displayed information may vary due to the different structure of the database files.
Note that at the top of the results page you will have a “Download” button. This button provides an easy and quick utility to download the data files of a selected number of runs. Next to each search result line there is a check box, which can be used to select any number of runs. Once selected, the user can choose his preferred data format (depending on the user's analysis program etc.). The formats available currently are:
ROOT - LEM and new PSI format
PSI-BIN – The old bulk PSI format
ASCII – Simple ASCII format, for use with origin or any text based application
MUD – TRIUMF mSR format, for use with msrfit for example.
NeXuS – ISIS mSR format
WKM – Simple ASCII format
The user may also choose to re-bin the histograms in the data file to reduce the size of the files or to obtain a suitable number of bins as required by a specific analysis software. The re-binning factor is optional and can be provided in the “Bin by:” field. Once you have selected the runs, data format, and binning factor, press on the “Download” button. The script will then prepare the data files as a compressed archive and serve it to the user as shown here:
The selected runs from the search results can be also plotted and fit immediately using your browser. This can be simply done by selecting the runs (be gentle, a few 10s of runs are too many for our poor web server) and then pressing on the “Plot Selected” button at the top of the results page. This will redirect you to another script, the musrfit.cgi, which will allow you to plot and fit the data:
The SearchDB.cgi script sets the run parameters for the fit/plot correctly, i.e. you should not change any field above the “Choose type of fitting function” line.
Select the fitting function (sum of up to three components is possible).
Set the time range for fitting and the binning factor.
Choose the type of fit, asymmetry or single histogram fit.
Choose the histograms
2 comma separated histograms to produce asymmetry plot/fit
any number of comma separated histograms to produces single histogram plot/fit
Press the “Next>” button and follow the instructions.
Please read the musrfit.cgi documentation for more details.