NAME#

cbfheader - change information stored in Dectris CBF images

SYNOPSIS#

cbfheader [ -h (--help) ] [ -a (--all) ] [ -c (--cfg) FILE ] [ --chi CHI ] [ --cx BeamX ] [ --cy BeamY ] [ -d (--dir) DIR ] [ --deb=DEBUG ] [ -g (--gui) ] [ --det DETECTOR_NAM ] [ --dist DISTANCE ] [ --dphi DPHI ] [ -i (--infile) file ] [ -f (--ffrm) FFRM ] [ -l (--lfrm) LFRM ] [ --kappa KAPPA ] [ -s (--show) ] [ --time TIME ] [ --wave WAVELENGTH ] [ --theta THETA ] [ -w (--write) ] [ -v (--verbose) ] [ -V (--VERSION) ] [ filename ]

DESCRIPTION#

cbfheader is a console program with optional graphical user interface for modifying the header of CBF-file with the Dectris minicbf headers.

OPTIONS#

-a (--all) Convert all data files matching the filename template in given directory. -c (--cfg) FILE Read data to be modified from a configuration file.

--chi CHI

Position of CHI axis in degrees

--cx BeamX

Horizontal position of beam center in pixels

--cy BeamY

Vertical position of beam center in pixels

--det NAME

Name of detector. Enclose in parentheses (\") when using spaces!

-d (--dir) OUTDIR

The o/p=files will be written to OUTDIR when given. Otherwise,

-D--deb=DEBUG

Hexadecimal debug code

--dphi DPHI

PHI increment per frame

-f (--ffrm) FFRM

Starting frame of series.

-g, (--gui)

Start the program with a graphical user interface. The GUI allows for loading images and also modifying header values. If no input file is given, the program automatically start in GUI mode.

-i (--infile) FILE

Optional input file parameter. The input file should have the general form prefix_###.suffix, where ### (or more #) is a running image number. You may either use the hashtag character or an actual numeric value. Either way, the program converts the string into a template.

--kappa KAPPA

Position of KAPPA axis in degrees

-l (--lfrm) LFRM

Ending frame of series.

--omega OMEGA

Position of OMEGA axis in degrees

--phi PHI

Position of PHI axis in degrees the input image will be overwritten.

--pixel PIXELSIZE

Pixelsize in microns

--show

Show original cbf header

--time TIME

Exposure time in seconds

--wave WAVELENGTH

Wavelength in Angstroems

-w (--write)

Do not overwrite existing i/p-files

-h (--help)

Prints a summary of program command line options.

-v (--verbose)

Increases verbosity level for more program output.

-V (--VERSION)

Only show program version and exit.

filename

Any argument not given with any of the keywords above will be treated as input file argument.

GUI#

The graphical user interface should be self-explaining. Afer loading an initial image, the header information is extracted and entered into the corresponding fields. If you edit any of the header fields, modified values will change the color. The values given here will end up in the headers unless they are overwritten by program initialization file (see below).

INPUT FILES#

The program detects if a file is a valid CBF file. When giving a directory as input file, all cbf files in that directory will be converted.

OUTPUT FILES#

The program will update the header of the input files. If an output directory is given, the original file will stay as is and the updated file will be written to the given directory.

CONFIGURATION FILE#

The program reads a Windows type configuration file from the following locations (in the order of precedence):

  • ./cbfheader.cfg

  • \$HOME/.cbfheader.cfg

Following the convention of .ini-files on Windows, the program reads configuration values from the section starting with line: [cbfheader]

COMPLETE EXAMPLE for cbfheader.cfg#

[cbfheader]
wavelength=1.3477
detector_distance=120.0
bit_depth_readout=16
element="Cu"
wavelength=1.541789
beam_center_x=1150.0
beam_center_y=1150.0
frame_period=10.0
frame_time=10.0
bit_depth_readout=32
sensor_material="Silicon"
description="None"
detector_number="000-000"
sensor_thickness=0.00450
threshold_energy=4000
detector_distance=120.0
two_theta=0.0
two_theta_start=0.0
two_theta_end=0.0
two_theta_increment=0.0
two_theta_range_total=0.0
two_theta_range_average=0.0
kappa=0.0
kappa_start=0.0
kappa_end=0.0
kappa_increment=0.0
kappa_range_total=0.0
kappa_range_average=g
omega=0.0
omega_start=0.0
omega_end=0.0
omega_increment=0.0
omega_range_total=0.0
omega_range_average=0.0
chi=0.0
chi_start=0.0
chi_end=0.0
chi_increment=0.0
chi_range_total=0.0
chi_range_average=0.0
phi=0.0
phi_start=0.0
phi_end=0.0
phi_increment=0.0
phi_range_total=0.0
phi_range_average=0.0

SEE ALSO#

marcvt

AUTHOR#

Claudio Klein, Marxperts GmbH, Norderstedt, Germany

COPYRIGHT#

© Copyright 2022 Marxperts GmbH, Norderstedt, Germany

ADDRESS#


_

Marxperts GmbH Phone: +49 - (40) - 529 884-0 Werkstr. 3 FAX: +49 - (40) - 529 884-20 D-22844 Norderstedt - GERMANY info\@marxperts.com www.marxperts.com _