Table of contents

Documentation for sfrmtools


Use with a Bruker Detector

sfrmtools reads a diffraction file in Siemens Frame Format (sfrm) and prints the information relevant to processing the diffraction data in XDS. It converts the geometrically relevant settings from the Bruker coordinate system into the XDS coordinate system, including the respective keywords used by XDS. In favrouable cases, and With a proper SFRM-header, sfrmtools creates a minimalistic XDS.INP file that is ready to run:

#> sfrmtools /path/to/myframes/data_01_0001.sfrm > XDS.INP
#> xds_par

I recommend to set a link to your data, to avoid overly long paths, and to avoid issues with spaces or other difficult characters. For further information, please take a look at the XDSWiki.

Use with an EIGER (or other non-native Bruker) Detector

Alternatively, sfrmtools extracts the settings for the experiments from an input file, e.g. PARAMS.INP. This is useful in case of alien detectors. At the Centre for X-ray Structure Analysis, we installed an EIGER2 R500 from Dectris Ltd. with our Bruker X8.

The third mode of sfrmtools updates existing diffraction files in sfrm format, by reading in the parameters from a similar file PARAMS.INP. This way, data from the EIGER2 R500 can be converted to CBF, from where they can be converted to sfrm. Since the header of those sfrm seems corrupt, sfrmtools populates all headers with the correct geometry parameters for indexing with APEX.

An example for this mode reads:

2THETA= 25
OMEGA= -36.922
PHI= 102
CHI= -80


Important: The oscillation width is calculated as

, which makes these parameters compulsory.

running sfrmtools results in:

#>  sfrmtools -p PARAMS.INP 
! sfrmtools:    Read an sfrm-file,                              !
!               extract experimental parameters and             !
!               print the corresponding XDS parameters.         !
! Copyright:    Tim Gruene, 2014                                !

! 2theta = 25deg, assuming vertical swing axis

DIRECTION_OF_DETECTOR_X-AXIS=  0.906308 0.0  0.422618
DETECTOR_DISTANCE= 35.000000 !(mm)
! Rotation about omega axis
ROTATION_AXIS= 0.000000 -1.000000 0.000000

Note that the filename PARAMS.INP is arbitrary.

XDS reads data from the Photon-series of detectors without further ado. Older files from CCD detectors, need to be unwarped. This needs additional information which are detector specific and not commonly available. It is best to convert those files to MAR image format from the APEX or PROTEUM suite. Previous versions of sfrmtools converted the input files into CBF format, but this is no longer necessary.


sfrmtools is distributed under the GNU General Public License. Please contact me if this license is not suitable for your purposes.

If you compile sfrmtools for other platforms or operating systems I would appreciate a copy for redistribution.



sfrmtools -h
shows a short usage summary:
! sfrmtools:    Read an sfrm-file,                              !
!               extract experimental parameters and             !
!               print the corresponding XDS parameters.         !
! Copyright:    Tim Gruene, 2014                                !
! Usage: sfrmtools file.sfrm                                    !
!        reads parameters from SFRM file and converts geometric !
!        values to XDS keywords                                 !
!        Options:                                               !
!        -h / -?: print this help message and exit              !
!                                                               !
! Usage: sfrmtools -p PARAMS.INP                                !
!        reads parameters from file and converts to XDS keywords!
!        recognised keywords (ensure no space before '='):      !
!        DETECTOR_DISTANCE=    [mm]                             !
!        2THETA=               [degree, APEX convention]        !
!        OMEGA=                [degree, APEX convention]        !
!        PHI=                  [degree, APEX convention]        !
!        CHI=                  [degree, APEX convention]        !
!        EXPOSURE_TIME=        [s, total for whole dataset]     !
!        SWEEP=                [degree, signed]                 !
!        AXIS=                 ["PHI" or "OMEGA"]               !
!        FRAME_TIME=           [s]                              !
!        NIMAGES=              total number of images           !
!                                                               !
! Usage: sfrmtools -u -p PARAMS.INP   file_??_????.sfrm         !
!        updates header entries in file_??_????.sfrm according  !
!        to parameters in PARAMS.INP                            !
!        additional keywords:                                   !
!        BEAMX0=       [degree] xpixel of beam at 2theta=0      !
!        BEAMY0=       [degree] ypixel of beam at 2theta=0      !

Tim Gruene

Last modified: Dec 07, 2020 11:54