Merge2cbf

From XDSwiki
Revision as of 15:29, 22 October 2019 by Kay (talk | contribs) (fix links)
Jump to navigation Jump to search

merge2cbf serves to convert frames from a number of detector formats (described at [1]) into the CBF compressed file format, and replaces 2pck which understood a few more formats.

Unfortunately these (mini-)CBF files do not have a header with wavelength, origin, distance, ... so they are only useful for reading them with XDS.

This is a sample MERGE2CBF.INP:

 
 !Generic file name, access, and format of data frames to be converted
 NAME_TEMPLATE_OF_DATA_FRAMES=../lysocust/lyz0.??? 
 !Numbers of first and last data frame to be converted
 DATA_RANGE=  1 500
 !Number of detector pixels along X, Y
 !NX=2048 NY=2048   ! the program should find this out by itself in most cases
 
 !Generic file name of output data frames.
 NAME_TEMPLATE_OF_OUTPUT_FRAMES=../lysocust/lyz0_???.cbf
 
 !This optional parameter value allows you to add a fixed number of
 !adjacent input frames for each output frame. (default=1)
 !NUMBER_OF_DATA_FRAMES_COVERED_BY_EACH_OUTPUT_FRAME=1

and this is an example for how to extract all frames from a HDF5 file, and write CBF files:

LIB=/usr/local/lib64/dectris-neggia.so 
NAME_TEMPLATE_OF_DATA_FRAMES= ../a2a003_0344.xds_flip.JF07T32V01.??????.h5
DATA_RANGE= 1 1512
NAME_TEMPLATE_OF_OUTPUT_FRAMES=a2a003_0344.xds_flip.JF07T32V01.??????.cbf
NUMBER_OF_DATA_FRAMES_COVERED_BY_EACH_OUTPUT_FRAME= 1

This particular HDF5 file was not readable by H5ToXds (see Eiger) nor by eiger2cbf (see Eiger), but the Dectris Neggia library could read it.